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
66
UltraGrid Rows Clear
posted

Hello,

I try to clear the rows of my UltraWinGrid control without lose the design (column headers, column sizes, ...), but I don't find the correct property.

I've already tried grid.Datasource = null; but this delete the design too...

Could you help me please ?

Parents
  • 17259
    Offline posted

    If you clear the rows, your data source items will be deleted too, so in order to clear the grid rows, delete the data source items.

    If you don't want to do that, Use a bindingsource and set the object type as a data source:

    binding:

    BindngSource bs = new BindingSource();

    bs.DataSource = MyList;

    grid.DataSource = bs;

    Deleting rows:

    bs.DataSource = typeof(MyDataItem);

Reply Children