I have a xamgrid bound to a WCF RIA datasource with pagersettings enabled.
I have my editing settings set to allowediting =rowIf I have IsonCellActiveEditingEnabled = False, everything works fine. If I have IsonCellActiveEditingEnabled =True then I get the following error in certain circumstances.
The error only appears if I click on a paging button before anything else after the grid loads.If I click on the blank space beside the paging buttons the first row goes into edit mode then I do not get the error when I click the paging buttons. If I click on the blank space beside the paging buttons twice the first row goes into edit mode then back out and I still do not get the error when I click on the paging buttons.
If I set IsonCellActiveEditingEnabled = False then I do not get the error at all.
Hi,
This is tricky, as i'm not sure where the removing would be getting triggered from based on your description.
Would you happen to have a sample that shows this that you could attach?
-SteveZ
SteveZ,
It looks like when the error happens it's trying to throw the first row into edit mode at the same time it's changing the page. I'm not sure why it is even trying to put it into edit mode if you are just clicking the page button.
If I can find time I will make a stand alone example, I will probably just work around the error for the short term.
Greg
Also, FYI, using the standard DataPager avoids the error as it doesn't seem to cause the same behaviour of throwing the grid into edit mode at the same time as changing the page.
Hi Greg,
When the xamGrid receives focus, if there isn't an ActiveCell, we make the first cell in the xamGrid active.
Since you have the setting to put the first xamGrid into edit mode, when a cell becomes active, it enters edit mode.
Try hooking into the xamGrid PageIndexChanging and call exit edit mode on the xamGrid.
I actually already tried that.. the pageindex changing fires, I call exiteditmode, then when the error happens the grid has still not exited from edit mode yet (at least visually it still looks like it's in edit mode).
This also fixes the error for me:
private void myDomainDataSource_LoadedData(object sender, LoadedDataEventArgs e) { olmUserXamGrid.Focus();
}