Expand All Child rows

Tags :
  • (None)
  • New Discussion
  • New Question
  • New Product Feedback

Hi I found this in the documentation to expand a Child:

Is there a way to do tha same thing but for all the rows in one time?


Thanks

Daniele Barbini


function ExpandChild()
{
var grid = ISGetObject("WebGrid1");
var selObj = grid.GetSelectedObject();

if (selObj == null)
{
alert("Please select a row");
return;
}
else
{
var row = selObj.GetRowObject();
// demonstrate server-side alike object model hierarchy
if (row.Table.ChildTables.length > 0)
{
if (!row.ChildExpanded)
row.ExpandChildRow();
else
alert("Row already expanded!");
}
else
alert("This row doesn't have any child rows!");
}
}
All times are GMT -5. The time now is 6:20 AM.
Previous Next