Don't want to show sorting icon for the first time after page load in jqGrid

前端 未结 2 1939
北荒
北荒 2021-01-03 16:55

I am using jqGrid and loading data through JSON. for the very first time when I get the data I sort that using custom method and pass that data to grid. But it always displa

2条回答
  •  旧巷少年郎
    2021-01-03 16:56

    I searched a lot for the answer on the net as well as on the official site of jqGrid but unfortunately could not find anything helpful.

    Now I am going with a hack to solve the issue and that is adding a blank column at the first place and make that hidden.

    colNames: ["", "Student name", "Course"],
    colModel: [
                    {
                        name: '',
                        index: '',
                        hidden: false
    
                    }, { 
                         name: 'student_name',
                         index: 'student_name',
                    }, {
                         name: 'course',
                         index: 'course'
          ]
    

    If someone get something helpful then please do post.

提交回复
热议问题