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

bind header of field

1 Answer 12 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Farshad heidary
Top achievements
Rank 1
Farshad heidary asked on 04 Aug 2010, 10:49 AM
hi guys
wanna bind header of TemplateField
<telerik:GridBoundColumn FilterControlWidth="80px" ShowSortIcon="true"
  Groupable="false" DataField="Title" SortExpression="Title" 
  ItemStyle-Width="23%" HeaderStyle-Width="23%" HeaderText="<%# getValue("Title") %>"
   ItemStyle-Font-Names="tahoma" ItemStyle-Font-Size="8"
    HeaderStyle-Font-Size="8" HeaderStyle-Font-Names="tahoma">
<HeaderStyle Font-Names="tahoma" Font-Size="8pt" Width="23%"></HeaderStyle>
<ItemStyle Font-Names="tahoma" Font-Size="8pt" Width="23%"></ItemStyle>
              </telerik:GridBoundColumn>
this code include error
how i can implement that?

1 Answer, 1 is accepted

Sort by
0
Shinu
Top achievements
Rank 2
answered on 04 Aug 2010, 01:52 PM
Hello Farshad,


You can set the HeaderText directly from code behind. You can use either ColumnCreated or ItemCreated event of grid. Both options are illustrated in the following documentation.
Localizing the grid headers



-Shinu.
Tags
Grid
Asked by
Farshad heidary
Top achievements
Rank 1
Answers by
Shinu
Top achievements
Rank 2
Share this question
or