Hi,
We are using 3 level hierarchical ultra web grid (Ingragistics V 8.2 with .Net 2.0).
We are trying to add a new row at a specific position in the grid just under the selected row and this has to happen at client side without Postback. We are currently using the inbuilt function in Infragistics grid currently but it is always adding the new row at the last at a given level.
The rows also contain dynamically added controls like Infragistics ultra web combo, ASP.Net drop-down lists and ASP.Net Checkboxes.
Please let us know if it is feasible and also please provide the sample code if any available for this scenario.
Thanks,
Sridevi Pedapudi
Please respond to my above query as soon as possible.
We need this for one critical client request and we are running out of time.
The below code will add a new row below the selected rows index or unless if you know the index where you want to add then set the index in the last line of code...
var grid = igtbl_getGridById('myGrid');
grid.Rows.addNew();
var row = grid.Rows.getRow(grid.Rows.length - 1);
grid.Rows.remove(grid.Rows.length - 1, true); grid.Rows.insert(row, selectedRow.getIndex() + 1);
Hi Sridevi,
It has been some time since your post but in case you still need help I would be glad to assist you.
The UltraWebGrid CSOM provides an insert() function, which allows insertion of rows at the specified position. This function may also be used to swap or reorder rows. For instance:
igtbl_getGridById('UltraWebGrid1').Rows.insert(igtbl_getGridById('UltraWebGrid1').Rows.getRow(1),"0")
will swap the second and first rows in an UltraWebGrid.
You can find more information and sample code on how to move rows up or down in the following thread:
http://community.infragistics.com/forums/p/26360/97006.aspx#97006
Please contact me if you require further assistance.
Best Regards,
Petar IvanovDeveloper Support EngineerInfragistics, Inc.http://ko.infragistics.com/support