Title: how to hide pagelist ini datagrid combogrid editor Post by: rishal on November 03, 2016, 09:06:23 PM Dear all,
i want to hide page list in combo grid ( editor ) can some show me how ? $('#tView_CCE').datagrid({ columns:[[ {field:'id',title:'id',width:160,fixed:true,hidden:true}, {field:'code',title:'Code',width:120,fixed:true, formatter:function(value,row){ return row.code; }, editor:{ id:'ts', type:'combogrid', options:{ panelWidth:500, idField:'code', textField:'description', required:true, pagination:true, fitcolumns:true, rownumbers:true, mode:'remote', columns:[[ {field:'code',title:'Code',width:90}, {field:'description',title:'Description',width:360} ]], // data: ceode, url:'index.php?m=_getcostitemlist2&jobnumber=' +sJobNumber, onSelect: onSelectGrid, onShowPanel: onShowPanel, onHidePanel: onHidePanel, onChange: onComboGridChange }} }, {field:'costitem',title:'Cost Item',width:380,fixed:true}, {field:'descr',title:'Description',width:280,fixed:true,editor:'text'}, {field:'Vendor1',title:'CV. Multi Abadi Jaya',width:140,fixed:true,editor:{type:'numberbox',options:{precision:0,groupSeparator:','}},align:'right'}, {field:'action',title:'Action',width:80,fixed:true,align:'center', formatter:function(value,row,index){ if (row.editing){ var s = '<a href=\"javascript:void(0)\" onclick=\"saverow(this)\">Save</a> '; var c = '<a href=\"javascript:void(0)\" onclick=\"cancelrow(this)\">Cancel</a>'; return s+c; } else { var e = '<a href=\"javascript:void(0)\" onclick=\"editrow(this)\">Edit</a> '; var d = '<a href=\"javascript:void(0)\" onclick=\"deleterow(this)\">Delete</a>'; return e+d; } } } ]], url:'index.php?m=_getcostestimatedetail3&jobnumber='+ sJobNumber , onEndEdit:function(index,row){ var ed = $(this).datagrid('getEditor', { index: index, field: 'code' }); row.costitem = $(ed.target).combobox('getText'); }, onBeforeEdit:function(index,row){ row.editing = true; $(this).datagrid('refreshRow', index); }, onAfterEdit:function(index,row){ row.editing = false; $(this).datagrid('refreshRow', index); }, onCancelEdit:function(index,row){ row.editing = false; $(this).datagrid('refreshRow', index); } }); Title: Re: how to hide pagelist ini datagrid combogrid editor Post by: jarry on November 04, 2016, 09:44:42 PM Attach the 'onBeginEdit' event. Retrieve the 'combogrid' editor, call the 'grid' method to get the datagrid object and then reset its pagination object. Please refer to the code below:
Code: onBeginEdit: function(index,row){ Title: Re: how to hide pagelist ini datagrid combogrid editor Post by: rishal on November 06, 2016, 07:05:40 AM jarry. first .. thank for your help. i'm try your code above but not working. it working when using xampp. but not working when using IIS 7.5 with php.
so strange when parent grid pagination set false the combogrid in editor doesn't load or render the combo grid , thank you so much for your help. |