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

RadGrid: Problem with AutoGenerate Columns=false

1 Answer 150 Views
GridView
This is a migrated thread and some comments may be shown as answers.
James Bonnyman
Top achievements
Rank 1
James Bonnyman asked on 06 Jul 2010, 10:36 AM
Hi!

I have encountered a problem with RadGrid when using AutoGenerateColumns=false. Having defined the required columns and setting the property to false (both in code and in the property designer) the resulting output when the grid is bound to a data reader is far from what is to be expected.

The columns I specify do not take on the values defined by the fields assigned to them, rather they display the contents of coumns in the order the query returns them, append the remaining columns (ignoring the autogenerate setting) to my defined set, ie

Query returns ID, strSurname, StrForename, strPhone, strLocation

I defined a simple grid (as a test) to display only the column strSurname with the heading "Surname"

What happened was I got a grid with columns "Surname",  lngID, strSurname, strForename, strPhone

With 'Surname' displaying the values for lngID, 'lngID' displaying the values for strSurname etc.

1 Answer, 1 is accepted

Sort by
0
Julian Benkov
Telerik team
answered on 09 Jul 2010, 10:16 AM
Hello James Bonnyman,

The current version of RadGridView resets columns and settings when LoadFrom() method is called to load data. The new version of RadGridView has a different behavior and dependency from the AutoGenerateColumns property. The new version of RadGridView control will be available in Q2 2010 release due in the end of the next week.

Kind regards,
Julian Benkov
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
James Bonnyman
Top achievements
Rank 1
Answers by
Julian Benkov
Telerik team
Share this question
or