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
620
CurrentAddItem
posted

I am using a VirtualColletion and it is set as the ItemSource on the XamGrid. For one of the fields in edit mode I have a TemplateColumn.EditorTemplate that displays a TextBox and a button.

The buttom calls a ChildWindow which is a lookup window.

The issue is when I get the result back from the Child Window I excpect to be able to look at the CurrentAddItem propery on the VirtualCollection but it is NULL. If I edit an existing record in the grid and use the lookup function the  CurrentEditItem property of the VirtualCollection is set to the correct record.

Is this a bug or am I doing something wrong or making an incorrect assumption.

Thanks

David

  • 5595
    posted

    Hi,

    The issue you are having is because of how XamGrid is behaving and it is by design.

    So, because the object that is created for the AddNewRow is created initially and it does not enter immediately in editing state (it enters later when the user performs the edit action), the XamGrid is canceling the AddNew operation right after the object was created and that's why VC returns null value for the CurrentAddItem property.

     

    HTH,

  • 5595
    posted

    Hi,

    I am not sure why would you need to look at CurrentAddItem property.

    I need to ask the following clarifying questions:

    • Is this first row and AddNewRow of the XamGrid?
    • And are you saying that when you perform edit on a normal DataRow of the XamGrid, as expected, the CurrentEditItem returns a reference to the corresponding to the row data item?

    Thanks,