We change Infragistics.WebUI.UltraWebGrid.UltraWebGrid to Infragistics.Web.UI.GridControls.WebDataGrid. Now, we have problems with replacing.
How we can migrate this code?
var row = igtbl_addNew(gridName, 0); var grid = igtbl_getGridById(gridName); grid.clearSelectionAll();
SelectRow2(grid, grid.Rows.length-1);
igtbl_EnterEditMode(gridName);
function SelectRow2(grid, rowNum) { alert("SelectRow2"); if ((grid.Rows.length > rowNum) && (rowNum >= 0)) { grid.Rows.getRow(0).getCell(0).activate(); var row = grid.Rows.getRow(rowNum); // Set the cell as the active cell grid.setActiveRow(row); row.setSelected(true); } }
Hello Anton,
This is how you can get reference to the grid and add new row client-side:
var grid = $find("WebDataGrid1");
// Create array of cell values for all values that cannot be null.
var row = new Array("CustomerID", "CompanyName");
// Add row.
grid.get_rows().add(row);
Clear selection:
grid.get_behaviors().get_selection().get_selectedRows().clear();
or
grid.get_behaviors().get_selection().get_selectedCells().clear();
Enter edit mode:
grid.get_behaviors().get_editingCore().get_behaviors().get_cellEditing().enterEditMode(gridCell);
Set active cell:
grid.get_behaviors().get_activation().set_activeCell(gridCell);
Select a row:
grid.get_behaviors().get_selection().get_selectedRows().add(row);
Here is the CSOM reference for WebDataGrid - http://help.infragistics.com/NetAdvantage/ASPNET/2012.1/CLR4.0/?page=WebDataGrid~Infragistics.Web.UI_namespace.html.
is there any way to create an client side instance of infragisitcs v12.1 webdatagrid
i don't want to create a server side grid instance at all.
Hello surya1984,
I suggest you to use our jQuery grid - http://es.infragistics.com/products/jquery/grid/
Here you can find the API reference - http://help.infragistics.com/jQuery/2012.2/ui.iggrid
And the documentation - http://help.infragistics.com/NetAdvantage/jQuery/2012.2/CLR4.0?page=jQuery_NA_jQuery.html
Thanq for u r reply
Currently i'm not using any MVC architecture.
so i cant able use infragisitcs jQuery Grid.