Hi, I have a WebHierarchicalDataGrid with AutoGenerateColumns in false, I define a column type TemplateDataField and inside put an Asp.Net control TextBox,in the band (only have 1) I put another TemplateDataField column and inside put an Asp.Net control TextBox.
I want when the user capture in TextBox parent the value typed set in the textbox of band child.
I want to know is this is possible do with JavaScript,
How can I obtain the rowindex for grid parent in the onchange event of TextBox?
How can I find the control TextBox in the Chaild Band?
Where I obtain the funtions for WebHierarchicalDataGrid that work in javascript? like getCell(), getRows() etc.
Thanks
Jose
Thie is the column in Parent Grid (Master)
<ig:TemplateDataField CssClass="CAlign" Key="Tipo_Cambio_Ac2">
<ItemTemplate>
<asp:TextBox ID="tbxTipoCambio" runat="server" CssClass="tbxNumeros" Width="75%"
Columnd TemplateDataField in Child Grid (Detail)
<
ig:TemplateDataField CssClass="CAlign" Key="Tipo_Cambio_Ac2">
Hello jcaudana,
Thank you for posting on Infragistics forum.
One possible approach to achieve the described by you functionality is to enable “Activation” and/or “Selection” for the grid –
http://help.infragistics.com/Help/NetAdvantage/ASPNET/2010.3/CLR4.0/html/WebHierarchicalDataGrid_Activation.html
http://help.infragistics.com/Help/NetAdvantage/ASPNET/2010.3/CLR4.0/html/WebHierarchicalDataGrid_Enabling_Selection.html
When “Selection” for the grid is enabled the clicking of TextBox will lead to selection of the underlying cell. Then you can take the data entered in the TextBox on Client-Side like this:
var WHDG = $find("WebHierarchicalDataGrid1");
var gridView = WHDG.get_gridView();
var selection = gridView.get_behaviors().get_selection();
var selectedCells = selection.get_selectedCellsResolved();
var cell = selectedCells[0];
var textBox = cell.get_element().children[0];
…
This code will return the actual TextBox as HTML element and you can then take the text entered in it.
If you know where the second TextBox is located (band, row, cell, etc.) you can access it by indexes like shown in the following article - http://help.infragistics.com/Help/NetAdvantage/ASPNET/2010.3/CLR4.0/html/WebHierarchicalDataGrid_Access_and_Edit_a_Cell.html
Note that TextBox should be rendered in the page otherwise it will be inaccessible.
Let me know if you have additional questions.
Let me know if you need further assistance with this question.