We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

refresh grid control

I have an application which does data binding similar to the Indexer Binding Demo.

My applicaiton allows the table to be reset with different columns and data.


I do the following to reset column and data in dataControl
and refresh with possibly different columns and data.

private void ResetTable()
{

gridControl.VisibleColumns.Clear();

foreach (VisibleColumnField vField in new VisibleColumnFields())
{ // REBUILD COLUMNS }


var dataSource = newdata// get different data
gridControl.ItemsSource = dataSource
}

gridControl.ColumnSizer = GridControlLengthUnitType.SizeToHeader;


}


When I do this the column width always uses the default column width rather than what I set columnSizer to.

What is the correct way to reset the grid control?

Thanks



2 Replies

MF Mary Fontana June 16, 2011 03:54 PM UTC

sorry this should be posted in grid wpf



RV Ramesh V Syncfusion Team June 20, 2011 07:33 AM UTC

Hi Mary,

Sorry for the Inconvenience caused.

We have analyzed the reported issue with our sample; we are not able to reproduce the issue.If possible can you share your sample with us, which would be much appreciable?

Please let us know if you have any queries.

Regards,
Ramesh


Loader.
Live Chat Icon For mobile
Up arrow icon