I would like to be able to add a row to the bottom of the grid but seem not to see a way to do this. The .add() method of the rows collection seems not to work.
Hi,
You have to create the actual row object and then add it. Here's a sample.
function AddRowToGrid() { var grid = ig_controls["WebDataGrid1"]; var row = new Array("Hello", 1, 2); grid.get_rows().add(row); return false; }
Ed
This seems not to work. Could you post your grid definition? Here is mine:
<
="EXECUTION_STATUS">
>
="System.String">
/>
="System.Int32">
="False">
="Text">
="nepSortOrder">
I would imagine that Autocrud cannot be false for this ajax call to work. With the webdatagrid, it posts the added row immediately. That functionality must be present in the grid itself.
What I would like to do is add a row, which appears at the bottom of the grid then the user can add the infomation in there. After which it can post back to the server. Is this not doable using this grid?
Hi again,
Let me add something. I had the same need, so I created the row without any info in the non key fields so it looked like a blank new row was added. The problem is the user closes the browser and you don't get a chance to delete blank rows that were left.
I am assuming that you don't like the look of the row adding behavior with a botom alignment. I didn't like it either. That would get you closer to what you're looking for.
Not doable. Here's something from the docs.