When dealing with mouse and keyboard events, once there are rows in the grid, if these rows contain cells, it is the cells that will raise the mouse and keyboard events. If the row does not have cells, then it is the row that will raise the events. With the mouse and keyboard events, it is easier to think of the grid as a panel containing “child” rows which in turn contain “child” cells.
You won’t get mouse and keyboard events directly from the grid once it contains data, therefore you will need to subscribe to the Click event of each cell of the DataRowTemplate.
starterGrid.DataRowTemplate.Cells[“UnitsInStock”].MouseUp += new MouseEventHandler(StarterGrid_MouseUp);
void StarterGrid_MouseUp(object sender, MouseEventArgs e)
object ob = sender;
Imported from legacy forums. Posted by Mohamed [Xceed] (had 1010 views)