Reload a JQGrid after Jquery Date Picker selection

后端 未结 1 1625
一个人的身影
一个人的身影 2021-02-13 18:23

I am using a JQGrid in one of my ASP.NET projects where the grid shows a list of items that are sortable/filterable (That\'s all working fine)

The only problem im having

相关标签:
1条回答
  • 2021-02-13 18:41

    I haven't used JQGrid, but from the documentation you should be able to do something like this:

    {
        name:'Due',
        index:'Due', 
        width:100, 
        align:"center",
        searchoptions:{
            dataInit:function(el){
                $(el).datepicker({
                    dateFormat:'dd-mm-yy',
                    onSelect: function(dateText, inst){ $("#grid_id")[0].triggerToolbar(); }
                });
            }
        }
    }
    

    Don't forget to change the #grid_id to the selector that matches your grid.

    Updated: Changed $("#grid_id").trigger("reloadGrid"); to $("#grid_id")[0].triggerToolbar();. Tested this on the jqGrid 3.5b demos and it works.

    0 讨论(0)
提交回复
热议问题