Click here to Skip to main content
15,917,177 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Getting really faustrated here. I trying to grab a reference to Infragistics WebDataGrid that has been placed on a Infragistics WebTab? (in JavaScript) I can get the correct object reference if the grid is not located on a WebTab but not within the WebTab itself. For example this works outside of the WebTab control:

C#
var grid = $find("wdgViews"); // works if grid is outside of webtab

// Get active row
var activeRow = grid.get_behaviors().get_activation().get_activeCell().get_row();

cell = activeRow.get_cellByColumnKey("ViewName");

ID = String(cell.get_value());


But won't work within the WebTab control. I've been able to come close with the following but WebDataGrid's method are not available there I cannot get the activeRow or Cell.

C#
var webTab = $find("WebTab1");
var grid = webTab.getTabAt(1).findChild("wdgViews");

  // Get active row
  var activeRow = grid.get_behaviors().get_activation().get_activeCell().get_row(); //--This is not Available

  cell = activeRow.get_cellByColumnKey("ViewName");

  ID = String(cell.get_value());


Any idea's? Need help

ehwash
Posted
Updated 2-Oct-13 9:10am
v3

This never fails once I post a question I've been researching for days I will stummble across and answer. Just had to add the .id property to the below code. Sorry about that.

C#
var tab = $find("WebTab1");
var gridId = tab.getTabAt(1).findChild("wdgViews").id;

var grid = $find(gridId);

// Get active row
var activeRow = grid.get_behaviors().get_activation().get_activeCell().get_row();
 
Share this answer
 
Did not see the solved myself button before

This never fails once I post a question I've been researching for days I will stummble across and answer. Just had to add the .id property to the below code. Sorry about that.

XML
var tab = $find("WebTab1");
var gridId = tab.getTabAt(1).findChild("wdgViews").id;

var grid = $find(gridId);

// Get active row
var activeRow = grid.get_behaviors().get_activation().get_activeCell().get_row()
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900