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

Binding Radgrid with bound fields and template fields

1 Answer 122 Views
Grid
This is a migrated thread and some comments may be shown as answers.
rohit
Top achievements
Rank 1
rohit asked on 24 Feb 2011, 07:09 PM
Hi,

I am binding grid which has some bound fields and some template fields.
Issue is only bound fields are binding to grid & not the template fields.
In template fields (Item template, i have some textboxes and one dropdownlist)
Any help is appreciated.
Can anyone send me sample code or example.

1 Answer, 1 is accepted

Sort by
0
Shinu
Top achievements
Rank 2
answered on 25 Feb 2011, 06:05 AM
Hello Rohit,

Here is the sample aspx for GridTemplate column.
aspx:
  <telerik:GridTemplateColumn UniqueName="LastName" HeaderText="LastName">
        <ItemTemplate>
         <asp:Label ID="Label1" runat="server" Text='<%#Eval("LastName") %>'></asp:Label>
        </ItemTemplate>
        <EditItemTemplate>
        <asp:TextBox ID="txt" Text='<%#Bind("LastName") %>' runat="server"></asp:TextBox>
        </EditItemTemplate>
</telerik:GridTemplateColumn>

Also refer this documentation for more on column types
Column types

Thanks,
Shinu.
Tags
Grid
Asked by
rohit
Top achievements
Rank 1
Answers by
Shinu
Top achievements
Rank 2
Share this question
or