Hey everyone-
So in the last few weeks I made a branch of my winform project in Visual Studio. Everything seems to be working fine with it, however on one particular form, I have a grid that uses DateTime pickers so the user can choose dates to save, and if I click the dropdown and click on Today at the bottom of the Calendar, I get the following error - "Can't access the 'IsValid' property when not in edit mode'. This happens right after my grid_CellChange event. I do have a line of code in there that I saw on another forum post as potentially being an issue....but this doesn't happen in the trunk version and this code has been in production for several years. The line of code is
grid.PerformAction(UltraGridAction.ExitEditMode)
I can't remember if I messed around with references or anything when I branched the project originally, but I'm thinking maybe I did. Why else would I receive this error in the branch, but not the trunk project.
Is anyone able to assist me with this issue? I am using Infragistics2.Win.v10.3. The runtime version is v2.0.50727. The version is 10.3.20103.1000.
Thanks in advance!
Hi Richard,
I tried this out in a quick sample and it works fine for me. I am posting my sample here so you can try it out on your machine and see if you get the same results. If my sample works for you, then it's likely something in your code that is causing isValid to be checked before it should be. If my sample give you the same exception, then this must be a big in the version of the controls you are using and so you probably need to get the latest service release.
4760.MemDataTable CS.zip
I am getting the exact same error message. In my case, the user is choosing a date from a datepicker in a grid and then clicking off the row in the grid. I am running the latest Infragistics code (19.1) so if this was fixed previously, I should have that fix already.
Hi Scott,
That line of code does raise some flags for me. It is unusual to exit edit mode in the CellChange event, since this event fires on most keypresses. It is possible that the grid is exiting edit mode before the user is done entering data, or before the grid has a chance to validate. If this change is specific to your branch version, then I'd highly suspect it as being the cause of the error. However, without having more context, I am unable to say whether this code is the culprit or if it is entirely innocent. To understand what is happening I need a sample that reproduces the behavior that I can use for debugging. Please provide me with a sample demonstrating the issue.
Your Infragisitcs version might matter, too. Is it feasible to try this out in the latest version to determine whether the behavior is different? If any issue existed on our end in 2010, it is possible that we fixed in a later version.