This is a migrated thread and some comments may be shown as answers.

Does GridView.DataSource binding change reset column visible/layout?

1 Answer 291 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Rob Ainscough
Top achievements
Rank 1
Rob Ainscough asked on 12 May 2010, 06:31 PM
I'm looking for an alternative grid that is NOT based on Microsofts VERY POOR implementation of DataGridView.  The problem I'm having with the Microsoft DataGridView is summarized nicely in this YouTube Video:

http://www.youtube.com/watch?v=K-LhoDw9CmY


Basically if I set column visible and column formatting options in the designer/IDE and then during application runtime my code sets DataSource = myDataTable and then change the DataSource to another DataTable, ALL my column visible state and formatting information is reset to "default" state ... NOT good.  (note: ONLY when the DataSource is changed, first time it works fine and keeps visible/formatting info).

Per video, the only work around is to add a BUNCH of code to DataBinding_Complete event to set my columns back to the state I setup via designer/IDE.

So my questions:

1.  Is Telerik Grid based on the Microsoft's implementation?
2.  Is this same behavior "by design" in the Telerik Grid?

Thanks, Rob.

1 Answer, 1 is accepted

Sort by
0
Martin Vasilev
Telerik team
answered on 18 May 2010, 09:19 AM
Hello Rob Ainscough,

Thank you writing.

RadGridView is not based on the Microsoft DataGridView. It is built on Telerik Presentation Framework which provides WPF-like visual effects and a great number of options to customize RadControls. You can find more details in our documentation.

As to your second question, RadGridView can generate columns based on the data source or can use a user defined (at design-time) columns' layout. If you follow the second scenario, the columns' layout will not be changed if you change the data source and the new data source has the same layout. In addition, you can use Save/LoadLayout methods to save the column settings.

Do not hesitate to contact me again if you have any additional questions.

Sincerely yours,
Martin Vasilev
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
Tags
GridView
Asked by
Rob Ainscough
Top achievements
Rank 1
Answers by
Martin Vasilev
Telerik team
Share this question
or