Hello everyone,
Can anybody let me know why the ultrawingrid refreshes and selects the very first row instead of being at the place where customer has selected a row on grid. It auto refreshes and selects the first row of grid, I tried setting SyncWithCurrencyManager property to false but that does not work, any ideas on how to stop the grid refreshing when it looses focus and let the selected row remain same instead of the first row.
Best
Swetha
1021I recommended handling AfterRowActivate only so that you could put a breakpoint in the handler for debugging purposes. I did not mean to imply that doing so would solve your problem. I am still unable to reproduce the problem you describe, primarily because I have no way of reproducing the problem. Please attach a sample that demonstrates the problem you are experiencing, or at the very least, describe the steps to reproduce.
this.grid.AfterRowActivate += new System.EventHandler(this.grid_AfterRowActivate);
during the breakpoint when the gridloads first row is slected and this event is hit and when I write the below code in event handler it doesn't really have any change, it still does not select the row which customer selects and removes the selection color.
private void grid_AfterRowActivate(object sender, EventArgs e)
{
grid.SyncWithCurrencyManager = false;
grid.DisplayLayout.Override.SelectTypeRow = Infragistics.Win.UltraWinGrid.SelectType.None;
}
where am I doing wrong? or anything else to be added, please let me know
I did not add a afterrowactivate event instead I tried afterrowselect event and it was not working, but why is the grid refreshing itself?
Sounds like you've ruled out an external change to the current record, which would have been my first guess.
Without a sample, however, it is very difficult to speculate about what is causing this.
One thing you could try is handling the AfterRowActivate event, put a breakpoint in the handler, and examine the call stack when execution breaks. You might be able to tell from that what triggered the chage.