Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

cfgrid questions.

New Here ,
Apr 28, 2010 Apr 28, 2010

I've got a cfgrid that is based on  a query, returns all the data fine.  One of the fields, Priority, is in  the database as a 0 or a 1, and in it's previous incarnation was  formatted on the page into showing high or low priority based on this  field.   I was wondering if anyone knew a way to change this so that  there are not a bunch of 0s and 1s in the grid.   Also, it would seem  that with the way I have my code now, the grids display 7 rows at a  time.  The boss has a quirk against scrolling in general, so to try and  work around that I'm trying to increase the maximum amount of rows shown  on the page. Setting maxrows did nothing for me unfortunately.

Here's the  entire page's worth of code, minus the query.  I am using CF 8.

<cflayout  type="vbox" align="center">
    <cflayoutarea name="menu"  overflow="visible" align="center" style="width:100%"  source="menu.cfm"></cflayoutarea>
    <cflayoutarea  name="mainArea" align="center" style="background-color:##CCDBEF;  height:100%">
        <cfform format="flash"  action="respond.cfm" name="openTicket" timeout="300" skin="haloblue"  wmode="opaque">
        <cfformgroup type="panel" label="Open  Tickets">
            <cfif Session.UserTypeID EQ  "1"><cfformitem type="html"><a  href="openTicket.cfm?self=1">View Only Your  Tickets</a></cfformitem></cfif>
             <cfif isdefined("url.complete")and(url.complete EQ  "1")><cfformitem type="html" style="color:##FF0000">Action  Completed Sucessfully</cfformitem></cfif>
             <cfgrid name="ticketGrid" format="flash" maxrows="15"  colheaders="yes" colheaderalign="center" colheaderbold="yes"  rowheaders="no" query="ticket" striperows="yes" gridlines="no"  griddataalign="center">
                <cfgridcolumn  name="ticketID" display="no">
                <cfgridcolumn  name="ufname" header="Assigned">
                <cfgridcolumn  name="dateEntered" header="Date Entered" mask="mm/dd/yyyy">
                 <cfgridcolumn name="fname" header="First Name">
                 <cfgridcolumn name="lname" header="Last Name">
                 <cfgridcolumn name="agency" header="Agency">
                 <cfgridcolumn name="subject" header="Subject">
                 <cfgridcolumn name="priority" header="Priority">
                 <cfgridcolumn name="problem" header="Problem">
             </cfgrid>
            <cfinput type="submit"  name="submitBtn" value="Respond">
        </cfformgroup>
         </cfform>
    </cflayoutarea>
</cflayout>

562
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Community Beginner , May 02, 2010 May 02, 2010
  1. With the 0/1 issue, in Oracle, you can use a DECODE statement in the query. Other databases have this feature but they call it something else.
  2. I think you need to look at setting the height of the grid, not the max rows to increase the number of records shown without scrolling.
Translate
Community Beginner ,
May 02, 2010 May 02, 2010
  1. With the 0/1 issue, in Oracle, you can use a DECODE statement in the query. Other databases have this feature but they call it something else.
  2. I think you need to look at setting the height of the grid, not the max rows to increase the number of records shown without scrolling.
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
May 04, 2010 May 04, 2010
LATEST

Worked like a charm.  Thanks!

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources