Welcome to the Xceed Community Sign in | Join | Help
Community Search  

Re: How to get DataItem from DataRow

  •  04-18-2008, 11:39 AM

    Re: How to get DataItem from DataRow

    That is indeed a valid method and we don`t plan on changing this.

    If you need a more explicit way of retrieving the data item, there is another interface that exists, one that goes through the DataRow`s DataGridContext.

    DataGridContext rowContext = DataGridControl.GetDataGridContext( dataRow );

    object dataItem = rowContext.GetItemFromContainer( dataRow );

    The main advantage of this method is that you can pass ANY UI element that is part of the VisualTree of the Row or Cell to the GetItemFromContainer() method and that the appropriate Data Item will be returned.

    Marc Laroche
    Software Developer
    Xceed Software Inc.


    I don’t suffer from insanity, I enjoy every minute of it. - Unknown
    Filed under:
View Complete Thread
Contact | Site Map | Reviews | Legal Terms of Use | Trademarks | Privacy Statement Copyright 2008 Xceed Software Inc.