Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Preventing table shift upon deleteRow()

Status
Not open for further replies.

leinspira

Technical User
Jul 11, 2009
1
JP
Hi-

I am writing the code for a form in which the user can specify the number of rows they want to add to a table to the bottom, then the number of rows they can delete (from the bottom), if they want.

Adding rows are fine - they just add on to the bottom without the position of the header row changing.

But for deleting rows, the rows are successfully deleted, but the remaining rows - including the header row - will shift downwards, as if moving to the vertical-center of the table of the previous length.

Can anyone tell me if there are is any way for me to fix this please?
Thank you!
 
Hi

I forgot who wrote it said:
The error is in the line I point to with my finger.

Without seeing your code I can only mention one thing : if you are deleting more than one elements from the end of a list and you are advancing forward and you are identifying the elements by their order number, you will shorten the list before reaching all deletable elements.


Feherke.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top