HELP!! Move an entire row

Results 1 to 2 of 2

Thread: HELP!! Move an entire row

  1. #1
    WS Guest

    Default HELP!! Move an entire row

    I have created a table populated with a recordset. I need to move an entire row/record up or down.<BR>Ex.<BR>Two command buttons on top of the page. First is used to move up, second is to move down.<BR>Within the table row, the first &#060;TD&#062; is a check box, the rest of the &#060;TR&#062; is data.<BR>What I would like to do:<BR>- user selects checkbox of row they would like to move<BR>- user clicks command button for up or down and this moves <BR>the entire row selected.<BR><BR>I have tried the moveRow method within a java function with no success.<BR>Any suggestions would be appreciated.<BR><BR>Thanks,<BR>WS

  2. #2
    Join Date
    Dec 1969

    Default RE: HELP!! Move an entire row

    Do you mean you want to make a roundtrip to ASP and regenerate the entire page with the row moved?<BR><BR>Or do you want to do it all in the browser?<BR><BR>If the former, then you&#039ll have to somehow remember all the data you sent to the page, along with its order. Probably, an array (two dimensional array?) stored in a Session value is the best bet.<BR><BR>If the latter...<BR><BR>First of all, it&#039s not really an ASP question. You might have better luck asking it on the JavaScript lists. Or, maybe better, in the DHTML groups.<BR><BR>Doing this by actually "sliding" pieces of the screen around *is* possible, but very tricky. A lot of ugly DHTML code with a lot of "if this is MSIE do this ELSE if it is NS do that" stuff. You can *NOT* do it with ordinary HTML.<BR><BR>The conceptually easiest way to do it is to put the table that is to be re-drawn in its own separate frame and then completely redraw the entire frame when you make a change. Naturally, the redraw must be accomplished from some other frame. This scheme works well in both MSIE and NS. But if you aren&#039t comfortable doing multi-frame JavaScript, then you&#039ll need to "educate" yourself before starting. You might want to visit and the JavaScript FAQ that they have there. <BR><BR>Have fun. This won&#039t be a piece of cake, no matter what you do.<BR><BR>

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts