Hi,
I'm using the UltraWebGrid version 4.3.20043.1142. I need to insert a row above an existing row using javascript. Here is the code I currently have:
// this is inside a mouse or keyclick handler or whatever... var row = igtbl_getActiveRow("myGrid"); var newrow = igtbl_addNew("myGrid", row.Band.Index); var grid = igtbl_getGridById("myGrid"); grid.Rows.remove(grid.Rows.length-1); grid.Rows.insert(newrow, row.getIndex()); igtbl_setActiveCell("myGrid", newrow.getCell(1).Element); igtbl_EnterEditMode("myGrid");
This works great on the client. The row is inserted, all the existing rows move down and I can enter text into the new row. The problem is when I save and the post happens. In the Page_Load, the inserted line is there but the line below it is gone. It looks like the new line wrote over the current line.
For example, here is the initial data in the grid:ArizonaCaliforniaNevada
this is how it looks after the javascript executes and I enter some text in the new row:ArizonaOregonCaliforniaNevada
but here is what I see in the Page_Load after the post:ArizonaOregonNevada
Any help is greatly appreciated.
You're using NetAdvantage 2004 Volume 3, which is a pretty old version of the toolset. If I remember right, inserting rows on the client (as opposed to just adding them) didn't pass any information back on the server in this version. I think, but am not absolutely certain, that this was added in either 2005 Volume 3 or 2006 Volume 1, or at least somewhere in that timeframe.
While I don't myself know of any workarounds, perhaps someone else may be able to suggest ideas.
That's all I needed to know. I've been meaning to upgrade and this gave me the excuse. After upgrading to 2006 Volume 3 I can see the new row on the server. Thanks!