Hi,
Can someone help me figure out how to get a label control text value from grid item template column?
I've tried both ways and neither seems to work. Thanks in advance.
Can someone help me figure out how to get a label control text value from grid item template column?
<telerik:GridTemplateColumn DataField="Amount" HeaderText="Amount" UniqueName="Amount"> <ItemStyle BorderStyle="NotSet" CssClass="test" HorizontalAlign="Right" Width="75px" /> <HeaderStyle HorizontalAlign="Center" Width="85px" /> <ItemTemplate> <asp:Label ID="lblAmount" runat="server" Text='<%# Eval("Amount") %>' Width="75"></asp:Label> </ItemTemplate> <EditItemTemplate> <asp:Label ID="lblAmount" runat="server" Text='<%# Eval("Amount") %>' Width="75"></asp:Label> </EditItemTemplate> </telerik:GridTemplateColumn>Label amount = (Label)item.FindControl("lblAmount");double? amount= (item["Amount"].FindControl("lblAmount") as Label).Text;