Home Forums WinForms controls Xceed Grid for WinForms Columns insertionrow reset?

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

    Hello,

    I have 1 gridcontrol on my form and change to different views with an combobox.

    Everytime the user selects another view in the combobox, i change the databinding for the gridcontrol.

    All works fine but when i switch a couple of times and then try to catch the values the rowdata just inserted with an insertionrow through the rowinserted event, i first get all the columns from the previous and at the end the rowdata wich was provided by the insertionrow.

    This wy the data i need is every time at another index depening of wich views were active before.

    When i do gridcontrol1.clear() all custom settings are lost and have to set evry time i swicth views.

    Is there a way to reset the grid without loosing all the things like colors and headerrows ( insertionrow, spacerrow etc.)

    Thank you for your comment

    Martijn

    Imported from legacy forums. Posted by Martijn (had 1793 views)

    Xceed Support
    Member
    Post count: 5658

    When you call gridcontrol1.clear(), it is normal that all the settings are lost. However, instead of calling gridcontrol1.clear(), you could clear the datarows and the columns. That way, a lot of settings would persist.

    e.g.,
    <code>
    //gridcontrol1.clear()
    gridControl1.DataRows.Clear();
    gridControl1.Columns.Clear();
    </code>

    Imported from legacy forums. Posted by CharlesB (had 3041 views)

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