jqgrid Save Cell Edit When DatePicker Is Closed

前端 未结 2 906
后悔当初
后悔当初 2020-12-20 02:59

I have the following JQGrid

    $(\"#requestTable\").jqGrid({
    url: url,
    datatype: \'json\',
    mtype: \'GET\',
    altRows: \'true\',
    colNames:          


        
2条回答
  •  臣服心动
    2020-12-20 03:45

    You should be able to use the onSelect() event from the datePicker in combination with the saveRow() from jqGrid. Something like:

       $(element).datepicker({
          onSelect: function(dateText, inst) { 
              var $input = inst.input; // the datepicker input
              var $row = $input.parents("tr"); 
              $("#requestTable").jqGrid('saveRow',$row.attr("id"), false); // this would probably need some work, I have no experience with jqGrid
       });
    

提交回复
热议问题