更改 JQuery Flexigrid 上的列标题文本?
我有一个 jquery flexigrid,我正在动态更改它,以便它显示不同的表格数据。我想在更改数据源(通过我成功执行的“url”)的同时,更改表列标题文本,但不太清楚如何执行此操作。例如,我希望一个 Flexigrid 表显示“员工”,然后如果用户单击一个链接,则该 Flexigrid 表显示“购买”。当用户进行此更改时,列标题文本需要反映购买列标题,以匹配我通过管道传输到它的 JSON 数据。同样,除了列标题文本之外,我可以毫无问题地让所有内容正常工作。当用户选择“购买”表在 Flexigrid 上查看时,我不知道如何更改标题文本。
这篇文章说明了如何做类似的事情,我试图用它作为基础来自己解决这个问题,但很快就登上了失败的船:flexigrid 上一致的标头
I have a jquery flexigrid that I'm dynamically changing so that it displays different tabular data. I want, along with changing the data source (via the 'url' which I'm doing successfully), to change the table column header text but can't quite figure out how to do so. So, for example, I want one flexigrid table to display the 'employees' and then if the user clicks a link, for that same flexigrid to display 'purchases'. When the user makes this change, the column header text needs to reflect the purchases column headers to match the JSON data I'm piping to it. Again, I'm having no problem getting everything to work except for the column header text. I can't figure out how to change the header text when the user selects the 'purchases' table to view on the flexigrid.
this post illustrates how to do something similiar and I attempted to use it as a base to figure it out myself but quickly boarded the fail boat: consistent headers on flexigrid
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
可能有更好的方法来做到这一点,但它
在这里工作是我起诉的 heml 请务必
在加载或重新加载 Flexigrid 后执行此操作
there may be a better way to do this but it works
here is the heml i sued
be sure to do this after the flexigrid has ben loaded or reloaded