Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
75
Can't access the 'IsValid' property when not in edit mode
posted

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!

Parents
  • 12480
    Offline posted

    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.

Reply Children