Home Forums WinForms controls Xceed Grid for WinForms Easy way to reset grid to default setup

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

    Hello again,

    I have a Clear button that resets my form to default (empty) values. I’d like to do the same with the GridControl so it looks just like it did when the form was first opened. With over a hundred reset methods available for the grid’s properties as well as the grid’s editors properties, is there a simple way to reset the grid in its entirety? There’s no ResetDataSource property and making any change to the datasource (even if I assign it the nane of the datasource it has) generates an interface error.

    Thank you.

    Imported from legacy forums. Posted by John (had 1861 views)

    User (Old forums)
    Member
    Post count: 23064

    Well, to reset the grid in its entirety, you can use the Clear method on the GridControl itself. However, this will clears everything, that is, the entire content of the grid including the data binding, styles and collections.

    This means that when you bind the grid again, there will be no ColumnManagerRow, no GroupByRow, etc…, thus you will need to recreate them if you want them.

    Imported from legacy forums. Posted by André (had 2951 views)

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