problem with datagrid.unselect
-
Hi, Why doesn't this unselect? (On MouseUp)
row = HitInfo.Row; if (dg.IsSelected(row)){this.dg.UnSelect(row);} else {this.dg.Select(row);}
I threw a messagebox in beforethis.dg.UnSelect(row);
and I can't even get it to come up. Thanks for any help! Mel -
Hi, Why doesn't this unselect? (On MouseUp)
row = HitInfo.Row; if (dg.IsSelected(row)){this.dg.UnSelect(row);} else {this.dg.Select(row);}
I threw a messagebox in beforethis.dg.UnSelect(row);
and I can't even get it to come up. Thanks for any help! MelSorry i don't have the solution but your problem is with the mouse down and up events. When you click your mouse, in the mouse down event a cell is being selected so the row is not selected. Making IsSelected() return false evey time. Hope that helps you find a solution. Cheers Kev