JqGrid not displaying data MVC

后端 未结 3 1201
难免孤独
难免孤独 2020-12-12 07:07

please check the jqgrid I am having, it just displays blank grid, my json is according to the expected format of grid. I am using jqGrid 4.4.4



        
3条回答
  •  旧时难觅i
    2020-12-12 07:27

    Did you inspect the result from the server in debugger ? Is there any issue show in the console ?

    If not, may be try to remove "ToArray()" in the jsonData block.

                var jsonData = new
            {
                total = myList .Count,
                page = 1,
                records = 10,
                rows = (
                  from d in myList 
                  select new
                  {
                      id = d.CP,
                      cell = new string[] {
                      d.CP.ToString(),
                      d.Val1.ToString(),
                      d.Val2.ToString(),
                      d.Val3.ToString()
                      }
                  })
            };
    

提交回复
热议问题