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

[Solved] Access RadGrid TemplateField RadNumericTextBox's value

1 Answer 103 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Dimitar Rusev
Top achievements
Rank 1
Dimitar Rusev asked on 28 Jul 2009, 07:44 AM
Hi, 

I have a RadGrid1 with the following TemplateField in it:

 

<telerik:GridTemplateColumn HeaderText="Number of units" UniqueName = "FldNumberOfUnits">

 

 

<ItemTemplate>

 

 

<asp:Label runat= "server" ID= "FldNumberOfUnits" Text='<%# Eval("FldNumberOfUnits") %>'>

 

 

</asp:Label>

 

 

</ItemTemplate>

 

 

<EditItemTemplate>

 

 

<telerik:RadNumericTextBox runat="server" ID="FldNumberOfUnits" skin= "Office2007" Type = "Number" Text='<%# Eval("FldNumberOfUnits") %>'>

 

 

</telerik:RadNumericTextBox>

 

 

</EditItemTemplate>

 

 

</telerik:GridTemplateColumn>

on editing, in the RadGrid1_ItemCommand eventhandler (e.CommandName = "Update"), i try accessing it like this:

 

"CType

 

(e.Item.FindControl("FldNumberOfUnits"), RadNumericTextBox).Text"

The control gets actually found, but the value I've entered does not. The text property is always an empty string. When I use an asp:TextBox in my EditItemTemplate the newly entered value gets picked.

Any help will be highly appreciated.
Thanks in advance!

 

1 Answer, 1 is accepted

Sort by
0
Martin
Telerik team
answered on 28 Jul 2009, 03:19 PM
Hello Dimitar,

I tried to reproduce the problem but without success.
Please run the attached sample project and let us know if it doesn't work on your side.

Regards,
Martin
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
Tags
Grid
Asked by
Dimitar Rusev
Top achievements
Rank 1
Answers by
Martin
Telerik team
Share this question
or