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



1 Reply

RA Rajasekar Syncfusion Team June 17, 2011 02:09 PM UTC

Hi Mary,

Sorry for the inconvenience caused.

We are able to reproduce the issue. while setting ColumnSizer as SizeToHeader default column width is applied to the GridDataVisibleColumn. But all the other ColumnSizer(SizeToCells,Star,Auto etc) are working fine.

Please created the incident in Direct Trac, so that you will provide the fix this issue.

For your reference, please find the tested sample below,

Sample:< http://www.syncfusion.com/uploads/redirect.aspx?&team=support&file=CS-1825171668.zip >

Please let us know if you have any queries.

Thanks,
Rajasekar



Loader.
Live Chat Icon For mobile
Up arrow icon