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

[Solved] radGrid with editing on user control question

1 Answer 120 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Bob
Top achievements
Rank 1
Bob asked on 28 May 2008, 07:49 PM
Hi all,

I have a radGrid with an edit button.  When the Edit button is clicked, I use the user control technique to update the data using radtextbox, raddateinput, radcombobox, etc.  This all works great.  But now I need to add an HTML input control to the user control.  My question is, how do I retrieve this value when the update button is clicked?  For example, here is the line of vb.net code I use to retrieve Telerik and ASP.Net control values:

Dim

MyUserControl As UserControl = CType(e.Item.FindControl(GridEditFormItem.EditFormUserControlID), UserControl)

And then I do something like this to get the value from MyUserControl:

CType

(MyUserControl.FindControl("tbEntityID"), TextBox).Text)

So how can I retrieve the value of this HTML Input control:

<

input id="HiddenEntityID" style="width: 73px" type="text" />


Thanks,
Bob

1 Answer, 1 is accepted

Sort by
0
Iana Tsolova
Telerik team
answered on 02 Jun 2008, 07:35 AM
Hi Bob,

To be able to access the HTML control server-side, you need to run it on the server and then use a similar bit of a code to get its value:

<input id="HiddenEntityID" runat="server" style="width:73px" type="text" /> 
 
CType(MyUserControl.FindControl("HiddenEntityID"), HtmlInputText).Value)  
 

Give this suggestion a try and let us know if it helps.

All the best,
Iana
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
Tags
Grid
Asked by
Bob
Top achievements
Rank 1
Answers by
Iana Tsolova
Telerik team
Share this question
or