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

[Solved] ItemTemplate edit mode

1 Answer 117 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Meik Napierski
Top achievements
Rank 1
Meik Napierski asked on 08 Mar 2010, 01:11 PM
Hello,
i have different columns in a grid and i want use the inline editing for this grid. For all the column it works fine but only the templated column can not be edited. What must I implementing to edit this templated column? In this scenario i want to edit the name property in the grid.

with best regards
Meik Napierski

<telerik:GridTemplateColumn   
  ReadOnly="false" 
  DataField="Name"   
  HeaderText="Name" 
  AllowFiltering="false"   
  UniqueName="Name" 
  HeaderStyle-Width="100%"   
  SortExpression="Name">  
<ItemTemplate> 
  <img src='<%# Eval("ImageUrl") %>' alt="" style="vertical-align: middle; margin-right: 7px;" /> 
  <%# Eval("Name") %> 
</ItemTemplate> 
                                </telerik:GridTemplateColumn> 

1 Answer, 1 is accepted

Sort by
0
Accepted
Daniel
Telerik team
answered on 08 Mar 2010, 06:15 PM
Hello Meik,

Please add EditItemTemplate as demonstrated below:
<telerik:GridTemplateColumn ReadOnly="false" DataField="Name" HeaderText="Name" AllowFiltering="false"
    UniqueName="Name" HeaderStyle-Width="100%" SortExpression="Name">
    <ItemTemplate>
        <img src='<%# Eval("ImageUrl") %>' alt="" style="vertical-align: middle; margin-right: 7px;" />
        <%# Eval("Name") %>
    </ItemTemplate>
    <EditItemTemplate>
        <asp:TextBox ID="TextBox1" runat="server" Text='<%# Bind("Name") %>' />
    </EditItemTemplate>
</telerik:GridTemplateColumn>

Best regards,
Daniel
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
Tags
Grid
Asked by
Meik Napierski
Top achievements
Rank 1
Answers by
Daniel
Telerik team
Share this question
or