javascript - How to get selectedRow data properly from table after change the state of ControlWrapper? -


How to get the selected data from the table after changing the state of the loc. Here my table controls the first row (after the dropdown controlling the control to be replaced), but I need 3, then only I get the appropriate line data

  google.visualization.ControlWrapper ({'controlType': 'categoryfilter', 'view': {'column': [1, 'container id': 'details_category_filter_container', 'Options': {'filterColumnLabel': 'P', 'UI': {'Match Type': 'Any', 'Label' '', 'Caption': 'All', 'Label Stacking': 'A' Satij 'allow typing ": false," allowing majority ": false}},' state ': {' selectedValues': [ 'A']}}); Var table = new google.visualization.ChartWrapper ({'charttype': 'table', 'containerId': 'my_details_table', 'options': {' allowHtml ': true,' alternatingRowStyle ': true,' width ':' 100 % ',' Max-height ':' 600px '}}); // Create Dashboard Var details_Table_DashBoard = New google.visualization.Dashboard (document.getElementById ('my_details_table')) Bind (myControlWrapper, Table). Draw (see); Google.visualization.events.addListener (table, 'ready', function) {google.visualization.events.addListener (table.getChart), 'select', function () {var visualizationTable = table.getChart (); If (VisualizationTable.GetSolation () [0]! == Undefined) {var CurrentCopy = VisualizationTable.GetSeclectation () [0] .OR; // Here the current RA 0 gives, if I select the first row after the filter, but this is the third line see (before filtering) var name = dataTable.getFormattedValue (currentRow, 2); Var time = datatable.getformatedva (current, 3);}});});  

By referring to the data used by the table by calling ChartDriper GetDataTable Method:

In the built-in DataTable [edit - added line translation, assumes that no other datawiz has been used] < / P>

  Google.visualization.events.addListener (table, 'ready', function) {google.visualization.events.addListener (table.getChart), 'select', function () {var visualizationTable = table.getChart (); If (VisualizationTable.GetSollection () [0]! == Undefined) {var currentRow = VisualizationTable.GetSockling () [0] .OR; var dt = table.getdateTable (); // Receive line index in the underlying data / data view // You will need to do this for each datawave that sits between your ChartDraper and Base Datatile Rowindx = DT.getTableRowIndex (currentRow); Var name = dataTable.getFormattedValue (rowIndex, 2); Var time = dataTable.getFormattedValue (rowIndex, 3);}});});    

Comments

Popular posts from this blog

Pass DB Connection parameters to a Kettle a.k.a PDI table Input step dynamically from Excel -

multithreading - PhantomJS-Node in a for Loop -

c++ - MATLAB .m file to .mex file using Matlab Compiler -