Hi All,
I need to add child rows to the parent row in an Ultrawebgrid when the user clicks on the Expand [+] button. This needs to be done in the Javascript. I am making an Ajax call and getting the child rows data. How can I achieve this? Please reply as soon as possible as it is blocking further development. Thank you.
In case you are looking for a load on demand function you might consider using a WebHierarchicalDataSource and enable LoadOnDemand on the grid. Otherwise, you can handle some of the client side events, retrieve the expanded row and add a new row to the rows collection:
<
ClientSideEvents AfterRowExpandedHandler="OnRowExpanded"/>
<script type="text/javascript" language="javascript">
function OnRowExpanded(gridName, rowId) {
var row = igtbl_getRowById(rowId);
var rows = row.getChildRows();
row.addNew();
}
</script>
Note that you would also need to set AddNewRowDefault's Visible property to Yes.
Let me know if this is similar to your scenario.
I am getting the error "Object does not support this property or method" at the line
row.addNew()
Please let me know what is the cause. I am still not able to get a solution
I tried calling invokeXmlHttpRequest in the client side also to populate the child rows. But the server side handler function uwgViolations_XmlHTTPRequest is not getting called.
Could you attach any sample so we can see what is going on?
Thanks,
I am getting error "Object does not support this property or method" at the Addrow statement. Please provide support at the earliest.
grid = igtbl_getGridById( grid_id );
(grid.Rows.length > 0)
{
i=0;i<grid.Rows.length;i++)
rowBand1 = grid.Rows.getRow(i);
).getValue()==assetClassTest)
rows = rowBand1.getChildRows();
rows.addNew();
;