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
370
How to clear data only from ultragrid
posted

How to clear data only from ultragrid..Keep other settings intact as they dont change and i dont want to apply the definition again and again..

Also, what exactly does sortedcolumns.clear do? can you give a specific example?

Thanks for your help 

Parents
No Data
Reply
  • 469350
    Offline posted

    Hi,

    What other settings are you referring to? You mean things like the column widths and positions?

    The only way to clear the data from the grid is to remove it from the data source. So you would have to remove all of the rows from your data source. How you do that depends on what kind of DataSource you are using.

    Another option would be to use the Save method on the grid's DisplayLayout, then set the grid's DataSource to null. This will destroy the layout, of course, but then you could re-load the layout from the save.

    Sandeep D said:
    Also, what exactly does sortedcolumns.clear do? can you give a specific example?

    When you sort a column in the grid (usually by clicking on the column header), the column is added to the SortedColumns collection. Clearing the collection will remove all columns from the collection and thus clear the sort indicator on every column in the band. Sorting is also tied to grouping. So if you are using OutlookGroupBy, the grouping would be cleared, as well.

Children