Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Javascript > Insert new row before current row

Thread Tools

Insert new row before current row

Posts: n/a
I want to insert empty row before current row in data bound table.
Unfortunately, the row is added to end of table.

To reproduce:

1. Run the code in the end of this message in IE 5.5+
2. Right-click in some row

Observed result:

Row is added to end of table

Expected result:

Row must be inserted before the right-clicked row

Any idea how to insert a row before current row to table ?

Code to reproduce:

<xml id="result" javaDSOCompatible="true"><result>

<TABLE DATASRC="#result">

result.recordset.AbsolutePosition=event.srcElement .recordNumber;
return false;
<td><input type=text datafld=item></input></td>
<td><input type=text datafld=price></input></td>
<td><input type=text datafld=quantity></input></td>

Reply With Quote

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
HOWTO: FormView Insert Operation - Get Row ID of Inserted Row Dan Sikorsky ASP .Net 2 04-30-2009 09:50 PM
Make new record current in DetailsView after Insert Hanno ASP .Net Datagrid Control 0 08-04-2006 11:00 PM
how to get the new identity ID just after insert a new row? Quentin Huo ASP .Net 2 07-18-2006 10:13 AM
ie6 Insert Row at specific Row Index of Table Giggle Girl Javascript 18 02-07-2006 07:54 AM
Re: how to get the new identity ID just after insert a new row? Phil Winstanley [Microsoft MVP ASP.NET] ASP .Net 1 06-11-2004 10:46 PM