Problems with table sorting

Results 1 to 3 of 3

Thread: Problems with table sorting

  1. #1
    Join Date
    Dec 1969

    Default Problems with table sorting

    Your help here would be really appreciated:<BR>I need to show 5 records per column only and the database Table has over 10 records so I just want to show the first 10. <BR>I want the first 5 records to sort along the left column and then when 5 is reached go into the right side column and stop if it reaches to records.<BR><BR>At the moment it is showing 9 on the first column but only shows one record on the right side. I have tryed changing the code but can&#039t get it right.<BR><BR>How can I fix this?<BR>The Main code is below:<BR><BR>rad<BR><BR><BR>&#060;table width="100%" border="0" cellspacing="0" cellpadding="0"&#062;<BR> &#060;tr&#062; <BR>&#060;%<BR>Dim Repeat2__numRows<BR>Repeat2__numRows = 10<BR>Dim Repeat2__index<BR>Repeat2__index = 0<BR>rsDirectors_numRows = rsDirectors_numRows + Repeat2__numRows<BR>%&#062; <BR>&#060;%<BR>iColCount = 1<BR>While ((Repeat2__numRows &#060;&#062; 0) AND (NOT rsDirectors.EOF))<BR> if iColCount = 1 then Response.Write("&#060;tr&#062;")<BR><BR>Response.W rite("&#060;td&#062;&#060;font face=Arial size=1&#062;" & (rsDirectors.Fields.Item("ContactLast").Value) )<BR>Response.Write(", " & (rsDirectors.Fields.Item("ContactFirst").Value)) <BR>Response.Write("&#060;/font&#062;&#060;/td&#062;")<BR><BR> iColCount = iColCount + 1<BR> if iColCount &#062; 2 then <BR> iColCount = 2<BR> Response.Write("&#060;/tr&#062;")<BR> end if <BR><BR> rowCount = rowCount + 1<BR> <BR> Repeat2__index=Repeat2__index+1<BR>Repeat2__numRow s=Repeat2__numRows-1<BR>rsDirectors.MoveNext()<BR><BR>Wend<BR>%&#062 ; <BR>&#060;/table&#062;

  2. #2
    paripurna Guest

    Default go this way

    just get the recordset values into two strings and then split that string(while creating the string itself use some delimeter), then split that string with that delimeter and store in to arrays. Display in the table with as u wish no of rows and no of columns.<BR><BR>

  3. #3
    Join Date
    Dec 1969

    Default RE: go this way

    I would really like to know how to do this as I wouldn&#039t know. It sounds like it could be perfect but Im not from a programmnig background and im limited to what I can write. I&#039ve never used delimters or even arays.<BR><BR>I would be appreciated if I could see an example.

Posting Permissions

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