I have a search RadToolBar control:
I want to get/set the value of any RadTextBox controls on the toolbar, using Javascript.
I have this function:
Thank you!
<telerik:RadToolBar ID="RadToolBar2" runat="server" Width="100%" OnClientButtonClicking="OnClientButtonClicking"> <Items> <telerik:RadToolBarButton runat="server" Text="Button 0"> <ItemTemplate> <asp:Label ID="Label1" runat="server" Text="Name:"></asp:Label> <telerik:RadTextBox ID="RadTextBox1" runat="server" Width="70" /> <asp:Label ID="Label2" runat="server" Text="Surname:"></asp:Label> <telerik:RadTextBox ID="RadTextBox2" runat="server" Width="70" /> <asp:Label ID="Label3" runat="server" Text="Age:"></asp:Label> <telerik:RadTextBox ID="RadTextBox3" runat="server" Width="70" /> </ItemTemplate> </telerik:RadToolBarButton> <telerik:RadToolBarButton runat="server" CommandName="NewSearch"> </telerik:RadToolBarButton> <telerik:RadToolBarButton runat="server" CommandName="SearchGrid"> </telerik:RadToolBarButton> </Items></telerik:RadToolBar>I want to get/set the value of any RadTextBox controls on the toolbar, using Javascript.
I have this function:
function OnClientButtonClicking(sender, args) { var button = args.get_item(); if (button.get_commandName() == "NewSearch") { //Here is where I want to clear the content of all the RadTextBox controls on the toolbar } if (button.get_commandName() == "SearchGrid") { //Here is where I want to get the content of a RadTextBox control from the toolbar }}Thank you!