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

radgrid

1 Answer 28 Views
Grid
This is a migrated thread and some comments may be shown as answers.
sindhu1
Top achievements
Rank 1
sindhu1 asked on 08 Oct 2010, 05:26 PM
I have radgrid build with template columns.each Column has a textbox and label.One column needs to readonly in edit mode but it should allow values while inserting new record.How should i go about it??

1 Answer, 1 is accepted

Sort by
0
Princy
Top achievements
Rank 2
answered on 11 Oct 2010, 06:06 AM
Hello Sindu,

You can set the ReadOnly property of the TextBox from mark up depending on whether it is in edit/insert form.

<telerik:GridTemplateColumn >
   <EditItemTemplate>
        <asp:TextBox ID="TextBox1" runat="server" ReadOnly='<%#Convert.ToBoolean((Container is GridEditFormInsertItem) ? "False" : "True" )%>'></asp:TextBox>
        <asp:Label ID="Label1" runat="server" Text="Label"></asp:Label>
    </EditItemTemplate>
</telerik:GridTemplateColumn>

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