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
Adding and Removing Multiple Columns from Grid


i trying to remove or add multiple columns from grid by removeColumnDefinitionAt and addColumnDefinition then updateData, the grid not effect with changes but when remove one in time, grid effect

  • 33910
    Suggested Answer
    Offline posted

    Hello ueldeep,

    Thank you for your post!

    From your post, I am under the impression that what you are currently doing is removing multiple columns or adding multiple columns in the IGGridView, and then calling the updateData() method on the grid. When doing this, you are currently seeing no effect in the IGGridView. Please let me know if my impression is incorrect on this matter, as the following goes off of that impression.

    I have created a sample project that does what you are referring to, but currently, it doesn't appear that I can reproduce the behavior you are seeing. I have attached the sample code that I am using for my data source as well as my MainActivity. Please test this code on your machine, as whether or not it works may further help to indicate the nature of this issue. Another thing you may want to try is calling grid.reloadData rather than updateData after adding or removing your columns. This is a bit more expensive of a call, as it essentially redraws the grid and its columns, rather than just refreshing the grid's data, but it may work for you.

    Please let me know if you have any other questions or concerns on this matter.

    Associate Developer
    Infragistics Inc.