This content has been marked as final. Show 9 replies
I'm having the same trouble as well... I've tried modifying the properties of the grid to no avail...1 person found this helpful
Check out Dan Vegas cfExt project at riaforge.com1 person found this helpful
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)...
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!
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)
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:
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...
2 NEW EXCELLENT TUTORIALS on context menu for cfgrid!
p.s. no, we don't need to "modify line 18 by adding enableCtxMenu:true"
However, still can't hide CFGRIDROWINDEX...
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".1 person found this helpful
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...
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,