CFGRID - 替换多列上的数据存储或过滤器
ColdFusion 8
我有一个基于查询的 cfgrid。它没有绑定到 cfc 函数,因为我想要一个滚动网格,而不是分页网格(如果使用 BIND,则必须提供页码和页面大小)。我可以弄清楚如何使用它来过滤一列下面的代码,但我确实需要过滤三列...
grid.getDataSource().filter("OT_MILESTONE",t1);
在过滤字符串中添加更多内容并不能解决问题。 ..它忽略第一对值以外的任何内容..
所以..我想如果我调用一个传递三个值并将查询结果返回给我的函数,我可以替换网格的数据存储..但是我无法找出替换它的语法。
查询返回的变量具有以下格式:
{"COLUMNS":["SEQ_KEY","ID","OT_MILESTONE"],"DATA":[[63677,"x","y"]]}
有什么想法吗?
ColdFusion 8
I have a cfgrid that that is based on a query. It is not bound to a cfc function because I want a scrolling grid, not a paged grid (you must supply the page number and page size if you use BIND).. I can figure out how to make it filter on one column by using the following code, but I really need to filter on three columns...
grid.getDataSource().filter("OT_MILESTONE",t1);
Adding more to the filter string does not do the trick...it ignores anything more than the first pair of values..
so..I thought if I called a function that passes the three values and returned the query results to me, I could replace the Data Store for the grid..but I cannot figure out the syntax to get it to replace.
The returned variable for the query has the following format:
{"COLUMNS":["SEQ_KEY","ID","OT_MILESTONE"],"DATA":[[63677,"x","y"]]}
Any ideas?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
你看过
queryconvertforgrid()
吗?http://www.cfquickdocs.com/cf9/#queryconvertforgrid
更新:您看过吗在这些?
http://www.danvega。 org/blog/index.cfm/2008/3/10/ColdFusion-8-Grid-Filtering
http://www.coldfusion-ria.com/Blog/ index.cfm/2009/1/13/Playing-with-cfgrid--Filter-showhide-Columns-and-using-the-YUI-Buttons-library
http://cfsilence.com/blog/client/index.cfm/ 2007/8/9/Ajax 网格中的过滤记录
have you looked at
queryconvertforgrid()
?http://www.cfquickdocs.com/cf9/#queryconvertforgrid
Update: have you looked at these?
http://www.danvega.org/blog/index.cfm/2008/3/10/ColdFusion-8-Grid-Filtering
http://www.coldfusion-ria.com/Blog/index.cfm/2009/1/13/Playing-with-cfgrid--Filter-showhide-Columns-and-using-the-YUI-Buttons-library
http://cfsilence.com/blog/client/index.cfm/2007/8/9/Filtering-Records-In-An-Ajax-Grid
经过大量的血、汗、泪水和咒骂......这就是答案,以防其他人可能需要通过多个变量过滤 cfgrid:
你将需要一个 JS 修剪功能......
确保列名是大写的...... 。
after much blood, sweat, tears and swearing..here's the answer, in case anyone else might need to filter a cfgrid by more than one variable:
you will need a JS trim function...
Make sure the column names are caps...