hi team telerik,
I have RadGrid and ther is Textbox in ItemTemplate , like this :
and code behind for method
and Script JavaScript like this :
how can I get the index selectedRow RadGrid, like scripts that I remak in openWind function to be able to set when the event CloseWindow tbruleid
example:
I want when I click tbruleid existing index RadGrid1 in row 5, then appeared popup her choice, and I choose its value, and the popup closes, then the value I select it, there are at tbruleid index that is in row 5 ..
with existing javascript , his circumstances set all men in all tbruleid row ..
very simple, but I can not get the row index value after closewindow ..
please , I need your help...
thanks advance
chester(misbakhul)...
I have RadGrid and ther is Textbox in ItemTemplate , like this :
<telerik:RadGrid ID="RadGrid1" runat="server" CellSpacing="0" GridLines="None" AutoGenerateColumns="false" OnItemCreated="RadGrid1_ItemCreated"> <MasterTableView> <Columns> <telerik:GridTemplateColumn HeaderText="SANDI KETERANGAN"> <ItemTemplate> <telerik:RadTextBox runat="server" ID="tbsandi" Enabled="false" ></telerik:RadTextBox> </ItemTemplate> </telerik:GridTemplateColumn> </Columns> </MasterTableView>and code behind for method
OnItemCreated="RadGrid1_ItemCreated"
protected void RadGrid1_ItemCreated(object sender, Telerik.Web.UI.GridItemEventArgs e){ if (e.Item is GridDataItem) { var ditem = (GridDataItem)e.Item; var tbsansi = (RadTextBox) ditem.FindControl("tbsandi"); tbsansi.Attributes.Add("onclick", "openWin(" + ditem.ItemIndex + ");"); }}and Script JavaScript like this :
<script type="text/javascript"> function openWin(index) { //var RadGrid1 = $find('<%=RadGrid1.ClientID %>'); //var masterTableView = RadGrid1.get_masterTableView(); //var row = masterTableView.get_dataItems()[index]; var oWnd = radopen("SandiKeterangan.aspx", "RadWindow1"); } function OnClientClose(oWnd, args) { var arg = args.get_argument(); var grid = $find("<%=RadGrid1.ClientID %>"); var MasterTable = grid.get_masterTableView(); var length = MasterTable.get_dataItems().length; for (var i = 0; i < length; i++) { var RadTextBoxSandi = MasterTable.get_dataItems()[i].findElement("tbsandi");//access the TextBox control RadTextBoxSandi.innerText = arg.Kode;// assigning value to TextBox control } }</script>how can I get the index selectedRow RadGrid, like scripts that I remak in openWind function to be able to set when the event CloseWindow tbruleid
example:
I want when I click tbruleid existing index RadGrid1 in row 5, then appeared popup her choice, and I choose its value, and the popup closes, then the value I select it, there are at tbruleid index that is in row 5 ..
with existing javascript , his circumstances set all men in all tbruleid row ..
very simple, but I can not get the row index value after closewindow ..
please , I need your help...
thanks advance
chester(misbakhul)...