DataGrid with Dynamic Link
Hi Guys- I'm trying to use the DataGrid for my log viewer, but i need to link the summary field to a details page. When I use the code below, it appends all sorts of garbage onto the URL. What am I doing wrong? cfform cfgrid name=log format=html pagesize=20 striperows=yes delete=yes bind=cfc:common.cfcs.log.getlog({cfgridpage}, {cfgridpagesize}, {cfgridsortcolumn}, {cfgridsortdirection}) cfgridcolumn name=datecreated header=Date width=100 / cfgridcolumn name=type header=Type width=100/ cfgridcolumn name=category header=Category width=100/ cfgridcolumn name=summary header=Summary width=200href=details.cfm hrefkey=id/ cfgridcolumn name=details header=Details width=400/ /cfgrid /cfform Thanks Phil ~| Enterprise web applications, build robust, secure scalable apps today - Try it now ColdFusion Today ColdFusion 8 beta - Build next generation apps Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:291153 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
RE: DataGrid with Dynamic Link
I don't see the link here. You are probably doing something with that href and hrefkey but i have no idea what, setup a proxy listener or just bind the summary to this grid. I think you are making it harder than it needs to be. But I would need to see the summary or how that works to be sure, is the summary another grid, or a pod or a window etc. Regards Dale Fraser http://learncf.com -Original Message- From: Philip Hayes [mailto:[EMAIL PROTECTED] Sent: Tuesday, 16 October 2007 6:14 AM To: CF-Talk Subject: DataGrid with Dynamic Link Hi Guys- I'm trying to use the DataGrid for my log viewer, but i need to link the summary field to a details page. When I use the code below, it appends all sorts of garbage onto the URL. What am I doing wrong? cfform cfgrid name=log format=html pagesize=20 striperows=yes delete=yes bind=cfc:common.cfcs.log.getlog({cfgridpage}, {cfgridpagesize}, {cfgridsortcolumn}, {cfgridsortdirection}) cfgridcolumn name=datecreated header=Date width=100 / cfgridcolumn name=type header=Type width=100/ cfgridcolumn name=category header=Category width=100/ cfgridcolumn name=summary header=Summary width=200href=details.cfm hrefkey=id/ cfgridcolumn name=details header=Details width=400/ /cfgrid /cfform Thanks Phil ~| Check out the new features and enhancements in the latest product release - download the What's New PDF now http://download.macromedia.com/pub/labs/coldfusion/cf8_beta_whatsnew_052907.pdf Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:291160 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: DataGrid with Dynamic Link
read up on how to use hrefkey attribute of cfgridcolumn tag. you are using it wrong. there is no column named ID that it is tied to. -- Azadi Saryev Sabai-dee.com http://www.sabai-dee.com ~| ColdFusion 8 - Build next generation apps today, with easy PDF and Ajax features - download now http://download.macromedia.com/pub/labs/coldfusion/cf8_beta_whatsnew_052907.pdf Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:291162 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
RE: DataGrid with Dynamic Link
I understand what those tags are doing, what I don't understand is what you want to do. From the sound of your post you wanted to do something when a row was clicked, not a column. If you can answer my question on where the details show, ie pod, div or window (ajax or html) types then I can assist. Regards Dale Fraser http://learncf.com -Original Message- From: Azadi Saryev [mailto:[EMAIL PROTECTED] Sent: Tuesday, 16 October 2007 11:23 AM To: CF-Talk Subject: Re: DataGrid with Dynamic Link read up on how to use hrefkey attribute of cfgridcolumn tag. you are using it wrong. there is no column named ID that it is tied to. -- Azadi Saryev Sabai-dee.com http://www.sabai-dee.com ~| Download the latest ColdFusion 8 utilities including Report Builder, plug-ins for Eclipse and Dreamweaver updates. http;//www.adobe.com/cfusion/entitlement/index.cfm?e=labs%5adobecf8%5Fbeta Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:291164 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Re: DataGrid with Dynamic Link
@Dale: my comment and suggestion to read up on hrefkey use was addressed to the OP, Phil, not to you... i know you know those attributes :) sorry if I caused confusion but why do you think there is more to Phil's code than what he has posted? his mentioning garbage in the url makes me think his grid is just a simple one linked to a details.cfm page via summary column... Azadi Dale Fraser wrote: I understand what those tags are doing, what I don't understand is what you want to do. From the sound of your post you wanted to do something when a row was clicked, not a column. If you can answer my question on where the details show, ie pod, div or window (ajax or html) types then I can assist. Regards Dale Fraser http://learncf.com -Original Message- From: Azadi Saryev [mailto:[EMAIL PROTECTED] Sent: Tuesday, 16 October 2007 11:23 AM To: CF-Talk Subject: Re: DataGrid with Dynamic Link read up on how to use hrefkey attribute of cfgridcolumn tag. you are using it wrong. there is no column named ID that it is tied to. -- Azadi Saryev Sabai-dee.com http://www.sabai-dee.com ~| Create robust enterprise, web RIAs. Upgrade to ColdFusion 8 and integrate with Adobe Flex http://www.adobe.com/products/coldfusion/flex2/?sdid=RVJP Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:291166 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
RE: DataGrid with Dynamic Link
You are probably correct, I was going to suggest how I do it. Which is using cfajaxproxy With javascript you have more control if you setup the listeners, clicking on a column that refreshes the page and takes you to another loosing the grid is very Web 1 to me, so everything im working on would have this type of summary in a cfwindow, pod, another grid etc etc. Regards Dale Fraser http://learncf.com -Original Message- From: Azadi Saryev [mailto:[EMAIL PROTECTED] Sent: Tuesday, 16 October 2007 12:51 PM To: CF-Talk Subject: Re: DataGrid with Dynamic Link @Dale: my comment and suggestion to read up on hrefkey use was addressed to the OP, Phil, not to you... i know you know those attributes :) sorry if I caused confusion but why do you think there is more to Phil's code than what he has posted? his mentioning garbage in the url makes me think his grid is just a simple one linked to a details.cfm page via summary column... Azadi Dale Fraser wrote: I understand what those tags are doing, what I don't understand is what you want to do. From the sound of your post you wanted to do something when a row was clicked, not a column. If you can answer my question on where the details show, ie pod, div or window (ajax or html) types then I can assist. Regards Dale Fraser http://learncf.com -Original Message- From: Azadi Saryev [mailto:[EMAIL PROTECTED] Sent: Tuesday, 16 October 2007 11:23 AM To: CF-Talk Subject: Re: DataGrid with Dynamic Link read up on how to use hrefkey attribute of cfgridcolumn tag. you are using it wrong. there is no column named ID that it is tied to. -- Azadi Saryev Sabai-dee.com http://www.sabai-dee.com ~| Get the answers you are looking for on the ColdFusion Labs Forum direct from active programmers and developers. http://www.adobe.com/cfusion/webforums/forum/categories.cfm?forumid-72catid=648 Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:291171 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4