weixin_33712881 2014-08-07 13:58 采纳率: 0%
浏览 16

将ajax数据绑定到jqxGrid

I have a form which uses submitForm() to send it to the server by ajax Call.

    <form id="searchform" onsubmit="return submitForm();">

I want the data returned by the this ajax call to populate a jqxGrid.

    function submitForm() {
            $.ajax({
                    type:'GET', 
                    url: 'searchresults.php',
                    dataType: 'json',
                    data: $('#searchform').serialize(), 
                    success: get_ajax_data
            });
            return false;
        }

        function get_ajax_data(data, statusText, xhr) {

        }

Just a hint would be enough. I am new to jqxGrid and have seen the demos and prepared my json data accordingly.

  • 写回答

1条回答 默认 最新

  • weixin_33704591 2014-09-28 18:09
    关注

    jqxGrid data is bound to local or remote source. If your Ajax submit is populating a database then you would set the source of the jqxGrid to a PHP script or similar which queries the DB to send back the required data.

    After you have submitted the data, you can re-set the jqxGrid source to refresh the data.

    You can set the cells values manually using the 'setcellvalue' method. But I would recommend the first option of binding the grid to a database.

    评论

报告相同问题?

悬赏问题

  • ¥15 使用C#,asp.net读取Excel文件并保存到Oracle数据库
  • ¥15 C# datagridview 单元格显示进度及值
  • ¥15 thinkphp6配合social login单点登录问题
  • ¥15 HFSS 中的 H 场图与 MATLAB 中绘制的 B1 场 部分对应不上
  • ¥15 如何在scanpy上做差异基因和通路富集?
  • ¥20 关于#硬件工程#的问题,请各位专家解答!
  • ¥15 关于#matlab#的问题:期望的系统闭环传递函数为G(s)=wn^2/s^2+2¢wn+wn^2阻尼系数¢=0.707,使系统具有较小的超调量
  • ¥15 FLUENT如何实现在堆积颗粒的上表面加载高斯热源
  • ¥30 虚心请教几个问题,小生先有礼了
  • ¥30 截图中的mathematics程序转换成matlab