Getting Bound text from textbox

2 posts, 1 answers
  1. Eric Klein
    Eric Klein avatar
    183 posts
    Member since:
    Aug 2009

    Posted 23 Jul 2013 Link to this post

    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?



  2. Answer
    Jayesh Goyani
    Jayesh Goyani avatar
    2732 posts
    Member since:
    May 2010

    Posted 24 Jul 2013 Link to this post

    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
  3. UI for ASP.NET Ajax is Ready for VS 2017
Back to Top