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

empty rows in cfgrid

New Here ,
Feb 20, 2008 Feb 20, 2008

Copy link to clipboard

Copied

Hi All.
I have am using CFGrid in HTML mode and it is showing a ton of blank rows. There should only be 6 rows showing but it showing 24 blank rows. How do I go about using cfgrid and only showing the rows that have data?

THANK YOU!
TOPICS
Advanced techniques

Views

539

Translate

Translate

Report

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
Participant ,
Feb 20, 2008 Feb 20, 2008

Copy link to clipboard

Copied

I assume u're getting data from a database, so either delete all the empty rows or in your query filter out the empty records
<Cfquery...>
select * from tablename
where fieldname <> ""
</cfquery>

Votes

Translate

Translate

Report

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 ,
Feb 20, 2008 Feb 20, 2008

Copy link to clipboard

Copied

Yeah, that is the thing the query is only pulling 6 rows, there are no empty rows

Votes

Translate

Translate

Report

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
Community Beginner ,
Feb 24, 2008 Feb 24, 2008

Copy link to clipboard

Copied

I'm having the same problem, except that I'm specifying the href and hrefkey atttributes and it's adding a "-" character in the blank rows and these rows have a blind link in them.

Is this just a problem with AJAX-bound HTML cfgrid, or is there a way to avoid this?

Votes

Translate

Translate

Report

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
Contributor ,
Jun 18, 2008 Jun 18, 2008

Copy link to clipboard

Copied

LATEST
Not sure if you got this already, but I achieved this when binding to a CFC. One of the required parameters is "pagesize". I do a quick check to see if query.recordCount is less than "pagesize" and if it is, set pagesize = query.recordCount (see code attached)

Cheers,

Davo

Votes

Translate

Translate

Report

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
Documentation