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.
Unfortunately, activation email could not send to your email. Please try again.

refresh data and visible columns

Thread ID:

Created:

Updated:

Platform:

Replies:

99882 Jun 16,2011 11:46 AM Jun 16,2011 11:49 AM WPF 1
loading
Tags: Diagram
Mary Fontana
Asked On June 16, 2011 11:46 AM


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


Mary Fontana
Replied On June 16, 2011 11:49 AM

I posted this in the wrong forum!
Sorry!


CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.

;