Home Forums WPF controls Xceed DataGrid for WPF Accessing the insertion row in code

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • User (Old forums)
    Member
    Post count: 23064
    #26871 |

    Hi,

     I want to be able to access an insertion row from C# code. Specifically, from inside a method that handles an event fired from a cell editor control.
     

    In our application, we have a control that allows a user to query the database for a valid value. For example, if they know a product code they may type it in directly, otherwise, a popup window appears that allows them to search. Either way, the control validates the input and fires an event if it is valid. We use this control as a cell editor in a grid, and have a handler for the event that fires after validation. Additionally, we have sub-classed both the insertion row and insertion row cells to allow us to view data in the cells before the entire row is committed.

     The dilemma is that I cannot find a way to reference the insertion row from the event handler. Most of my efforts have centered around trying to use the GetContianerFromItem method of the data grid control, but I have been unable to get this to work. Thanks in advance for any advice or suggestions.
     

    Imported from legacy forums. Posted by Jonathan (had 2321 views)

    Xceed Support
    Member
    Post count: 5658

    If you want to get a reference to the InsertionRow in the headers of a grid, you will need to handle the InsertionRow’s Loaded event and retrieve the reference there.

    Imported from legacy forums. Posted by Jenny [Xceed] (had 1531 views)

    User (Old forums)
    Member
    Post count: 23064

    Worked great, thanks!

    Imported from legacy forums. Posted by Jonathan (had 972 views)

    User (Old forums)
    Member
    Post count: 23064

    Stupid question maybe but:

     How can I do that? I do not see the insertion row as a source for events?

     

    Regards

    Klaus

    Imported from legacy forums. Posted by klaus (had 1039 views)

Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.