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

Edit text in GridTemplateColumn

2 Answers 42 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Ferdinand
Top achievements
Rank 1
Ferdinand asked on 29 Oct 2010, 08:46 AM
Hello,
I have grid that is for printing purposes. It has some GridBoundColumns and some GridTemplateColumns. Now, the users want to change some values in the cells before printing. Therefore I have implemented an EditCommandColumn. By pressing the edit button only the GridBoundColumns can be changed. Is it possible to have the TemplateColumns edited as well? The changed data does not have to be saved or anything else. It just has to be printed later.

Best regards
Ferdinand

2 Answers, 1 is accepted

Sort by
0
Accepted
Princy
Top achievements
Rank 1
answered on 29 Oct 2010, 10:19 AM
Hello Ferdinand,

I guess you have used the control inside ItemTemplate of GridtemplateColumn. If you want to appear the column cell in edit mode, you need to add the control inside EditItemTemplate of GridTemplateColumn.

ASPX:
<telerik:GridTemplateColumn UniqueName="GridTemplateColumn" Visible="false">
   <%--appears the control in normal mode--%>
    <ItemTemplate>
        <asp:TextBox ID="TextBox1" runat="server" Text='<%#Eval("FirstName") %>'></asp:TextBox>
    </ItemTemplate>
    <%--appears the control in edit mode--%>
    <EditItemTemplate>
        <asp:TextBox ID="TextBox1" runat="server" Text='<%#Bind("FirstName") %>'></asp:TextBox>
        </ItemTemplate>
    </EditItemTemplate>
</telerik:GridTemplateColumn>

I hope this helps,
Princy.
0
Ferdinand
Top achievements
Rank 1
answered on 29 Oct 2010, 11:36 AM
Thanks. That's what I was looking for...
Tags
Grid
Asked by
Ferdinand
Top achievements
Rank 1
Answers by
Princy
Top achievements
Rank 1
Ferdinand
Top achievements
Rank 1
Share this question
or