Hi,
I am trying to to bind the readonly property of a text box in Edit Item Template of rad grid as below, But it is not working. Please help me to achieve this.
<telerik:GridTemplateColumn DataField="invAmountToPay" SortExpression="invAmountToPay" UniqueName="invAmountToPay"
Aggregate="Sum" DataType="System.Decimal" HeaderText="Amount To Pay"
FooterAggregateFormatString="{0:N}" AllowFiltering="false">
<EditItemTemplate>
<asp:TextBox runat="server"
ID="AmountToPayTextBox"
Width="90px"
Style="text-align: right"
Text='<%# Eval("invAmountToPay","{0:N}") %>'
ReadOnly='<%# Eval("isReadOnly") %>'
DataFormatString="{0:N}">
</asp:TextBox>
</EditItemTemplate>
<ItemTemplate>
<asp:Label ID="AmountToPayLabel" runat="server" Text='<%# Eval("invAmountToPay","{0:N}") %>'></asp:Label>
</ItemTemplate>
<HeaderStyle Width="100px" />
<FooterStyle HorizontalAlign="Right" />
<ItemStyle HorizontalAlign="Right" ForeColor="#0000ff" />
</telerik:GridTemplateColumn>
I am trying to to bind the readonly property of a text box in Edit Item Template of rad grid as below, But it is not working. Please help me to achieve this.
<telerik:GridTemplateColumn DataField="invAmountToPay" SortExpression="invAmountToPay" UniqueName="invAmountToPay"
Aggregate="Sum" DataType="System.Decimal" HeaderText="Amount To Pay"
FooterAggregateFormatString="{0:N}" AllowFiltering="false">
<EditItemTemplate>
<asp:TextBox runat="server"
ID="AmountToPayTextBox"
Width="90px"
Style="text-align: right"
Text='<%# Eval("invAmountToPay","{0:N}") %>'
ReadOnly='<%# Eval("isReadOnly") %>'
DataFormatString="{0:N}">
</asp:TextBox>
</EditItemTemplate>
<ItemTemplate>
<asp:Label ID="AmountToPayLabel" runat="server" Text='<%# Eval("invAmountToPay","{0:N}") %>'></asp:Label>
</ItemTemplate>
<HeaderStyle Width="100px" />
<FooterStyle HorizontalAlign="Right" />
<ItemStyle HorizontalAlign="Right" ForeColor="#0000ff" />
</telerik:GridTemplateColumn>