I have a RadGrid in a RadAjaxPanel. The RadAjaxPanel also has a text box and button. RadAjaxPanel is then added to a Panel. Which in turn is added to an UpdatePanel.
A value needs to be entered in the textbox and based on selections, on click of button, the value is added to all the selected rows.
Radgrid is as follows:
onClientClick of button I want to call a javascript function to know the rows selected and read the value of the textbox and update DB accordingly. Please help me figure how to do this. I tried the following but the js is unable to find the RadGrid!
var MasterTable = g.get_masterTableView();
}
Suggest me if you have a better approach.
A value needs to be entered in the textbox and based on selections, on click of button, the value is added to all the selected rows.
Radgrid is as follows:
this._RadGrid1.ID = "RadGrid1";
this._RadGrid1.AllowSorting = true;this._RadGrid1.AllowFilteringByColumn = true; this._RadGrid1.AutoGenerateColumns = false;this._RadGrid1.EnableLinqExpressions = false; this._RadGrid1.ClientSettings.Selecting.AllowRowSelect = true; this._RadGrid1.MasterTableView.DataKeyNames = "...";this._RadGrid1.MasterTableView.ClientDataKeyNames = "..";this._RadGrid1.NeedDataSource += RadGrid1_NeedDataSource;I have added checkboxtemplate to the grid.The following are added to RadAjaxPanel. this.RadAjaxPanel.Controls.Add(this._RadLoadingPanel); this.RadAjaxPanel.Controls.Add(this._RadGrid1); this.RadAjaxPanel.Controls.Add(this._textBox1); this.RadAjaxPanel.Controls.Add(this._button1);function GetSelectedItems() { var g = $find("<%=RadGrid1.ClientID %>"); var MasterTable = g.get_masterTableView();
}
Suggest me if you have a better approach.