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

[Solved] About GridButtonColumn

3 Answers 238 Views
Ajax
This is a migrated thread and some comments may be shown as answers.
xiaofeng
Top achievements
Rank 1
xiaofeng asked on 02 Jun 2008, 11:29 AM
I get a  DataTable dt .I want to  put  two of dt's Column data in a GridButtonColumn of the RadGrid.How I can do it ?

3 Answers, 1 is accepted

Sort by
0
Princy
Top achievements
Rank 2
answered on 02 Jun 2008, 11:44 AM
Hi,

Try adding the GridButtonColumns to the column collection of the Grid and set the DataTextField for the GridButtonColumn as shown below.

ASPX:
<Columns> 
<telerik:GridButtonColumn DataTextField="ProductName" UniqueName="ProductName" HeaderText="ProductName" ></telerik:GridButtonColumn> 
<telerik:GridButtonColumn DataTextField="SupplierID" UniqueName="SupplierID" HeaderText="SupplierID" ></telerik:GridButtonColumn> 
</Columns> 

You can also go through the following help document link.
Column types

Thanks
Princy.
0
xiaofeng
Top achievements
Rank 1
answered on 02 Jun 2008, 01:33 PM
NO.I means that I want to  put  two of dt's Column data in only one GridButtonColumn of the RadGrid.They are in one Column of the RadGrid .Can I do this? If I can not do this ?  How can  do like that ?
0
Yavor
Telerik team
answered on 03 Jun 2008, 07:15 AM
Hello,

You can use a template column, to nest controls which will be populated from the datatable. You can then utilize Eval/Bind statements to populate the controls(for example labels) which will be used in the template column. Other than that, the standard boundcolumn does not support multiple fields in a single column.

Kind regards,
Yavor
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
Tags
Ajax
Asked by
xiaofeng
Top achievements
Rank 1
Answers by
Princy
Top achievements
Rank 2
xiaofeng
Top achievements
Rank 1
Yavor
Telerik team
Share this question
or