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

Getting Bound text from textbox

1 Answer 95 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Eric Klein
Top achievements
Rank 1
Eric Klein asked on 23 Jul 2013, 04:51 PM
I have a screen that has a Radgrid.  The radgrid uses a user control for the edit form.  When the edit button is pressed on the grid it loades the user control.  The User control is just a series of textboxes that are bound to the data from the grid.
<asp:TextBox ID="FamilyID" runat="server" value='<%# DataBinder.Eval(Container, "DataItem.FamilyID") %>'></asp:TextBox>

On the load event of this control there are a series of buttons that I want to make visible depending on the values in the text boxes.  The ossue I am having is since the values are set with DataBinder.Eval they do not have a value on the page_Load event.  How do I get the values so I can alter the screen?



1 Answer, 1 is accepted

Sort by
0
Accepted
Jayesh Goyani
Top achievements
Rank 2
answered on 24 Jul 2013, 06:57 AM
Hello,

You can not get the value in Page_Load, because value is assign to the control in ItemDataBound event.

Please try to access this value in either Radgrid's ItemDataBound/Prerender event or Page's PreRender event.

RadGrid Event sequence
RadGrid Events Detail

Jayesh Goyani
Tags
Grid
Asked by
Eric Klein
Top achievements
Rank 1
Answers by
Jayesh Goyani
Top achievements
Rank 2
Share this question
or