Welcome to the Xceed Community | Help
Community Search  
More Search Options

GetContainerFromItem or GetContainerFromIndex dont work after grid sort.

Sort Posts: Previous Next
  •  09-14-2009, 3:39 AM Post no. 23916

    GetContainerFromItem or GetContainerFromIndex dont work after grid sort.

    Hi i am in a difficult position with datagridcontrol, my datagrid control is binded to a datatable, when i sort the datagrid

    GetContainerFromItem or GetContainerFromIndex dont work, the methods is used to get the underneight datarow object from the datarowview item,

    Please help.

     

    Thanks in advance

  •  09-14-2009, 9:19 AM Post no. 23924 in reply to 23916

    Re: GetContainerFromItem or GetContainerFromIndex dont work after grid sort.

    What is not working? Is an exception being thrown or are you simply being returned null?

    Keep in mind that the GetContainerFromItem and GetContainerFromIndex methods will only return a container for the items in the same DataGridContext AND that are visible in the viewport. If the item is not in the correct context nor in the viewport, then the container will not be returned. 


    Senior Technical Writer
    - Xceed Software

    In three words I can sum up everything I've learned about life: it goes on.
  •  09-15-2009, 2:30 AM Post no. 23953 in reply to 23924

    Re: GetContainerFromItem or GetContainerFromIndex dont work after grid sort.

    Hi,

    Thanks for the replay....

    Well the function returns simply null, let me explain the scenario a little bit more. I was trying to display a popup left to the datarow, when user hover any datarow, since the grid is binded to a datatable i have datarowview as a item in grid.items collection , so no reference for actual xceed.datarow, later i found that GetContainerFromItem or GetContainerFromIndex return the underneight xceed.datarow , it was working properly and i as able to show popup left to the datarow.

    But when i sort any column getContainerFromItem return null, but if the column is again got to its default state the function again return item properly, so the only problem remains when i sort any column assending or decending the function dont work properly.

    Please help.

    I would be glad if you can provide any alternating solutions thought.

    Thanks again

    Md. Masudur Rahman

    Software Engineer.

    Kaz Software Ltd.

    www.kaz.com.bd

View as RSS news feed in XML
Contact | Site Map | Reviews | Legal Terms of Use | Trademarks | Privacy Statement Copyright 2011 Xceed Software Inc.