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

Autogeneratecolumns property ignored :(

3 Answers 128 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Paul Buxton
Top achievements
Rank 1
Paul Buxton asked on 25 Jun 2010, 12:22 PM
Hi,

Having spent way too long on this, what has to be done to switch autogenerated columns OFF on the GridView?  The property seems to be getting ignored, whether I set it in codebehind or in the propertymanager.

I've defined my columns through the collection in Vis Studio, and then call

SqlConnection cn = new SqlConnection(feedsSvr);
            cn.Open();
            SqlCommand cmd = new SqlCommand("ASP_GetDeltas", cn);
            cmd.CommandType = CommandType.StoredProcedure;
            cmd.Parameters.AddWithValue("@FeedGUID", feedGUID);
            SqlDataReader dr = cmd.ExecuteReader();
            radGridView1.MasterGridViewTemplate.AutoGenerateColumns = false;
            radGridView1.MasterGridViewTemplate.LoadFrom(dr);

Thanks for your help!!

Paul

3 Answers, 1 is accepted

Sort by
0
Julian Benkov
Telerik team
answered on 30 Jun 2010, 02:03 PM
Hi Paul Buxton,

When using the LoadFrom() method of the GridViewTemplate the current edition of RadGridView control replaces and auto-generates the columns. In the next version of RadGridView we will change this behavior and the LoadFrom() method will take into consideration the AutoGenerateColumns property and will load data only for columns with the same name like field in DataReader when AutoGenerateColumns is set to false.

The Q2 2010 release with the new RadGridView edition will be available mid next month.

Best wishes,

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
0
James Bonnyman
Top achievements
Rank 1
answered on 04 Jul 2010, 03:03 PM
Hi!

I have been experiencing the same problem and came across this thread in the forum however it seems that the fix indicated has not been implemented in the latest release as it was indicated it would be.

Since this is proving somewhat inconvenient (as to overcome it would mean having to duplicate a whole set of stored procedures just to limit the columns returned) are you able to give an  indication as to when the fix will be implemented.

Cheers!

James
0
Julian Benkov
Telerik team
answered on 07 Jul 2010, 12:32 PM
Hello James Bonnyman,

This mode is already implemented in the new version of RadGridView control. The new behavior of the LoadFrom() method will be introduced in the Q2 2010 final release, which is planned for next week.
 

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