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

context menu in ColdFusion 8 ajax cfgrid

Guest
Feb 07, 2008 Feb 07, 2008

Copy link to clipboard

Copied

I'm not sure if this is because Ext 1 vs Ext 2, but in CF8 which uses Ext,
there's no context menu when right-click on the column header.

However, Ext doc does have a nice contenxt menu, demo:
http://extjs.com/deploy/ext/examples/grid/array-grid.html

Any idea how to enable this for CF8 CFGRID? I already tried going into cfgrid.js
and added "enableColumnHide:true" in var _42 (line 18), but still no luck.

Any help would be appreciated, thank you!
TOPICS
Advanced techniques

Views

1.5K

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

correct answers 1 Correct answer

Mar 05, 2008 Mar 05, 2008
2 NEW EXCELLENT TUTORIALS on context menu for cfgrid!

http://www.danvega.org/blog/index.cfm/2008/3/4/ColdFusion-8-Grid-Context-Menus

http://www.danvega.org/blog/index.cfm/2008/3/4/ColdFusion-8-Grid-Context-Menu-Part-II


p.s. no, we don't need to "modify line 18 by adding enableCtxMenu:true"


However, still can't hide CFGRIDROWINDEX...

Votes

Translate

Translate
Community Beginner ,
Feb 21, 2008 Feb 21, 2008

Copy link to clipboard

Copied

I'm having the same trouble as well... I've tried modifying the properties of the grid to no avail...

Anyone?

Thanks,
-Jared

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
Explorer ,
Feb 21, 2008 Feb 21, 2008

Copy link to clipboard

Copied

Check out Dan Vegas cfExt project at riaforge.com

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

Copy link to clipboard

Copied

I've checked that out before and its great for creating new Ext objects (although a license would still be needed in production use)... it doesnt answer the issue w/ the contextmenu not showing up with using a cfgrid.

I did some tests and subscribed to the headercontextmenu events and it is in fact firing, the menu it self tho us not appearing, and instead the Internet Explorer menu is appearing... (or firefox)...

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 ,
Mar 04, 2008 Mar 04, 2008

Copy link to clipboard

Copied

I figured it out!!!

Inside of cfgrid.js, modify line 18 by adding "enableCtxMenu:true", then include a script reference in the header of your page to "/CFIDE/scripts/ajax/ext/package/menu/menus.js"

Send me a private message if you have any trouble with it!

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
Guest
Mar 04, 2008 Mar 04, 2008

Copy link to clipboard

Copied

NICE! thank you!!!

now I need to figure out how to really hide columns that I want to hide, (e.g. CFGRIDROWINDEX, and maybe the real id of the table in the DB)

Henry

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
Guest
Mar 04, 2008 Mar 04, 2008

Copy link to clipboard

Copied

OK, after some investigation, there's no way to hide CFGRIDROWINDEX unless you comment out the last element in the _cf_gridColModel array in the <head> inserted by <cfgrid> calling <cfhtmlhead>... which is:
{header:'CFGRIDROWINDEX'.....

TOO BAD! If <cfsavecontent> can save the code inserted by the <cfhtmlhead>, then we can parse the string and remove the last element.. but that's not the case unfortunately...

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
Guest
Mar 05, 2008 Mar 05, 2008

Copy link to clipboard

Copied

2 NEW EXCELLENT TUTORIALS on context menu for cfgrid!

http://www.danvega.org/blog/index.cfm/2008/3/4/ColdFusion-8-Grid-Context-Menus

http://www.danvega.org/blog/index.cfm/2008/3/4/ColdFusion-8-Grid-Context-Menu-Part-II


p.s. no, we don't need to "modify line 18 by adding enableCtxMenu:true"


However, still can't hide CFGRIDROWINDEX...

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 ,
Mar 05, 2008 Mar 05, 2008

Copy link to clipboard

Copied

I noticed that same problem w/ CFGRIDROW Index. I figured since Ill probably NEVER name a database column by that name, I'd just modify the EXT code to prevent any columns with that name from showing. I went into grid.js and found where it creates the column menu. It basically just grabs the column model and builds the menu. I just surrounded the statements with an if statement to the effect of "if the column name does not equal 'CFGRIDROWINDEX', then add the column to the menu".

I don't have the exact line number off hand as I'm not at work, but if you need help finding it, let me know. The correct file should be located at /CFIDE/scripts/ajax/ext/package/grid/grid.js... Im not 100% on that location tho as again, Im not at work and don't have the files handy...

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
Engaged ,
Jul 17, 2013 Jul 17, 2013

Copy link to clipboard

Copied

LATEST

I am using CF9 and would like to use Ajax to build grid context menu,

I could not find the js file you mention, can you please advice where I can download the js file the link mentioned.

Your help and information is great appreciated,

Regards,

Iccsi,

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