Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Insert new row before current row
Message
From
29/06/2003 18:20:30
 
 
To
All
General information
Forum:
Internet
Category:
Microsoft Internet Explorer
Title:
Insert new row before current row
Miscellaneous
Thread ID:
00805135
Message ID:
00805135
Views:
45
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>
<row><item>pine</item><quantity>2</quantity><price>2.23</price></row>
<row><item>apple</item><quantity>3</quantity><price>1</price></row>
<row><item>orange</item><quantity>2.3</quantity><price>4.5</price></row>
</result></xml>

<TABLE DATASRC="#result">
<thead><th>Item</th><th>Price</th><th>Quantity</th>
</thead>

<tr 
oncontextmenu="
result.recordset.AbsolutePosition=event.srcElement.recordNumber;
result.recordset.AddNew(); 
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>
</tr></TABLE>
Andrus
Reply
Map
View

Click here to load this message in the networking platform