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

[Solved] Adding Columns from Code behind

2 Answers 173 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.
Balaji
Top achievements
Rank 1
Balaji asked on 07 Sep 2011, 10:06 AM
I was actually trying to bind my gridview from codebehind and then try to add columns in the gridview dynamically.
My datasource in this case is an XML.
I have tried working with it in normal datagrid
The code for normal binding of datagrid from codebehind is given below.
DataGridTextColumn dg = new DataGridTextColumn();
                   dg.Header = xe.Name.LocalName;
                   Binding bnd = new Binding();
                   bnd.Converter = new XMLValueConvertor();
                   bnd.ConverterParameter = xe.Name.LocalName;
                   dg.Binding = bnd;

I want to know how to perform the same operation in telerik radgridview


2 Answers, 1 is accepted

Sort by
0
Accepted
Maya
Telerik team
answered on 07 Sep 2011, 10:53 AM
Hi Balaji,

Please take a look at our online documentation for a reference on how to define columns in the code-behind. 

Regards,
Maya
the Telerik team

Thank you for being the most amazing .NET community! Your unfailing support is what helps us charge forward! We'd appreciate your vote for Telerik in this year's DevProConnections Awards. We are competing in mind-blowing 20 categories and every vote counts! VOTE for Telerik NOW >>

0
Balaji
Top achievements
Rank 1
answered on 07 Sep 2011, 11:44 AM
Thanks.
Thanks for giving me that link.
:)
Tags
GridView
Asked by
Balaji
Top achievements
Rank 1
Answers by
Maya
Telerik team
Balaji
Top achievements
Rank 1
Share this question
or