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

[?]Get RadTextbox's value in NestedViewTemplate

2 Answers 61 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Tan
Top achievements
Rank 1
Tan asked on 05 Mar 2012, 05:11 PM
Hello everyone,
I have a RadTextbox and a RadButton in NestedViewTemplate, How can I get RadTextbox's value when I click RadButton?
My code's below:
<MasterTableView  AutoGenerateColumns="false" GridLines="None" >
      <NestedViewTemplate>
          <table>
            <tr>
                <td><telerik:RadTextBox ID="RadTextbox1" runat="server">
                        </telerik:RadTextBox>
                </td>
            </tr>
            <tr>
                <td><telerik:RadButton ID="RadButton1" Text="Confirm" runat="server"
                                                      OnClick="btn_Click">
                        </telerik:RadButton>
                </td>
            </tr>
         </table>
     </NestedViewTemplate>
</MasterTableView>
 Thanks,
    -Tan-



2 Answers, 1 is accepted

Sort by
0
Casey
Top achievements
Rank 1
answered on 05 Mar 2012, 05:29 PM
Hi Tan,

You should be able to access the RadTextBox via the following code.

I hope this helps!
Casey

protected void btn_Click(object sender, EventArgs e)
{
    RadButton rb = sender as RadButton;
    RadTextBox rtb = (rb.NamingContainer as GridNestedViewItem).FindControl("RadTextbox1") as RadTextBox;
}
0
Tan
Top achievements
Rank 1
answered on 18 Feb 2013, 04:54 PM
Hi Casey,
I have resolved my problem, Thanks you very much. I'm sorry about my late answer, I'm really impolite too.
Thanks you again my friends.
Tags
Grid
Asked by
Tan
Top achievements
Rank 1
Answers by
Casey
Top achievements
Rank 1
Tan
Top achievements
Rank 1
Share this question
or