Arman Bimatov
Arman Bimatov

Reputation: 1829

How to get the containing WebDataGrid (Infragistics NetAdvantage) control from a row in Javascript?

When a row has been selected, I am successfully getting selected row:

var currentRow = sender.get_behaviors().get_selection().get_selectedRowsResolved()[0];

Is there a javascript function to get the parent WebDataGrid for that row? Something like this:

var grid = currentRow.get_parentGrid();

Thanks

Upvotes: 0

Views: 3012

Answers (2)

Arman Bimatov
Arman Bimatov

Reputation: 1829

I found the solution, its very simple:

currentRow.get_grid()

It gives you the parent grid.

Thanks Everyone!

Upvotes: 1

gsashev
gsashev

Reputation: 21

With:

var grid = currentRow.get_parentGrid();

you will access the parent row object, but to access the parent grid you need to call:

var grid = currentRow.get_parentGrid().get_grid();

Upvotes: 2

Related Questions