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

[Solved] Updating Header text of a autogenerated columns

3 Answers 104 Views
GridView
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
thdwlgP
Top achievements
Rank 1
thdwlgP asked on 01 Sep 2009, 09:06 PM
I had radgridview.itemsource binding to a list of an object. And I know there are 14 columns, I just want to set the column header text after the grid has been loaded. This code worked when I had version 2009.2.701.1020 but as soon as I upgraded to version 2009.2.812.1030, after the code goes through and updates the header texts, the column names go back to "Column1" through "Column14". Why? How can I change the Column header text?!


<telerikGridView:RadGridView x:Name="uxMyGrid" Width="Auto" MaxHeight="450"
 Visibility="Collapsed" AutoGenerateColumns="True" IsFilteringAllowed="False" ScrollMode="RealTime" 
 IsReadOnly="True" RowIndicatorVisibility="Collapsed" DataLoaded="uxMyGrid_DataLoaded" >                         
</telerikGridView:RadGridView> 
public bool isGridInitialized = false;

void
 uxMyGrid_DataLoaded(object sender, System.EventArgs e) 
     if (uxMyGrid.Columns.Count == 14 && !isGridInitialized) 
     { 
          for (int i = 0; i < ColumnHeaders.Count; i++) 
          { 
               uxMyGrid.Columns[i].Header = "Header Text"; 
          } 
          isGridInitialized = true
        }
 }


3 Answers, 1 is accepted

Sort by
0
Accepted
Vlad
Telerik team
answered on 02 Sep 2009, 05:48 AM
Hi,

Please download and try our latest internal build where this is fixed.

Sincerely yours,
Vlad
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0
NetSteps
Top achievements
Rank 1
answered on 02 Sep 2009, 05:24 PM
I downloaded this and header texts assignments are working again.
RadControls_for_Silverlight_2009_2_828_dev.zip


Is this what I should be using? (Not the trial version)
Thanks.
0
Hristo
Telerik team
answered on 03 Sep 2009, 11:38 AM
Hello Derek Maxfield,

The 2009_2_828 ships the latest fixes for our last official version 2009 Q2 SP1. As a side note, there are no functional differences between Dev and Trial versions.

Kind regards,
Hristo
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Tags
GridView
Asked by
thdwlgP
Top achievements
Rank 1
Answers by
Vlad
Telerik team
NetSteps
Top achievements
Rank 1
Hristo
Telerik team
Share this question
or