sorting cfgridcolumn by one field, display a differentfield

Ask a Question related to Coldfusion - Advanced Techniques, Design and Development.

  1. #1

    Default sorting cfgridcolumn by one field, display a differentfield

    Hi,

    I would like to know if I can use cfgridcolumn to sort by a field other than
    what I want to display. For example, this is my query:
    <cfquery name="myQuery"....>
    select rank, description
    from myTable
    </cfquery>


    So I want to display the "description" but when I click the header of this
    column I want to sort by "rank". Right now it will sort by description. I do
    not want to display "rank" because it has no meaning to the user.

    <cfgrid query="myQuery" name="mechGrid" rowheaders="no" height="800"
    sort="yes">
    <cfgridcolumn name="description" display="true" > <!---but I want to sort
    by "rank" here--->
    </cfgrid>

    Adila Guest

  2. Similar Questions and Discussions

    1. format display from database field
      :clock;:rose; The database saves the text from the textarea field of the form correctly. I can format the paragraph breaks okay that were entered...
    2. Display SQL rows by certain field?
      I have a SQL database that contains the fields "author," "title," and "category." I want to create a web page that sorts the entries by...
    3. Sorting information from text-field
      Information is entered randomly in just one text box (name, social security number, lenght,weight). The problem is how to recognize that what...
    4. I need to display a PDF from SQL Binary Field
      I am trying to display a PDF from SQL. All I am getting is garbage that looks like this: %PDF-1.3 %âãÏÓ 37 0 obj << /Linearized 1 /O 39 /H /L...
    5. [PHP] INT Field in mysql display without .00
      $var = number_format($var,0); On Wed, 2003-07-16 at 10:42, fkeessen@planet.nl wrote: -- Adam Voigt (adam@cryptocomm.com) Linux/Unix Network...
  3. #2

    Default Re: sorting cfgridcolumn by one field, display a different field

    no, the sort is sorting the data in the column, not going back to the query
    so this isn't possible.

    hth,
    ---nimer



    "Adila" <webforumsuser@macromedia.com> wrote in message
    news:cvvj2p$oqv$1@forums.macromedia.com...
    > Hi,
    >
    > I would like to know if I can use cfgridcolumn to sort by a field other
    > than
    > what I want to display. For example, this is my query:
    > <cfquery name="myQuery"....>
    > select rank, description
    > from myTable
    > </cfquery>
    >
    >
    > So I want to display the "description" but when I click the header of this
    > column I want to sort by "rank". Right now it will sort by description. I
    > do
    > not want to display "rank" because it has no meaning to the user.
    >
    > <cfgrid query="myQuery" name="mechGrid" rowheaders="no" height="800"
    > sort="yes">
    > <cfgridcolumn name="description" display="true" > <!---but I want to
    > sort
    > by "rank" here--->
    > </cfgrid>
    >

    Mike Nimer Guest

Posting Permissions

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

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139