6
« on: February 07, 2018, 03:22:49 pm »
Hi Param Query Team,
Below is the code snippet
<li><a href="#tabs-2">Tab 2</a>
</li>
<li><a href="#tabs-3">Tab 3</a>
</li>
</ul>
<div id="tabs-1">
<div id="tabs-1_tab_main" ></div>
</div>
<div id="tabs-2">
<div id="tabs-2_tab_main" ></div>
</div>
<div id="tabs-3" ></div>
<div id="tabs-3_tab_main" ></div>
</div>
</div>
$(function(){
var colModel= [
{title: "Checkbox Column ",minWidth: 150, align: "center", dataIndx: "checkboxcolumn", cb: { header: false, all: true, }, type: 'checkbox',editable:true, dataType: 'bool',editor: false,resizable: false, sortable:false,},
{title: "Column 1", minWidth: 130, align:"center", dataType: "float",dataIndx:"addlheatingDays",resizable:false,sortable: false,hidden:false},
]
var data = [{}];
var dataModel = {
data:data,
recIndx: "",
location: "local",
};
var toolBar='';
var obj={
height: 502,
width: 1354,
dataModel:dataModel,
colModel:colModel,
wrap: false,
hwrap: true,
resizable: false,
rowBorders: true,
sortable:false,
stripeRows : false,
numberCell: { show: true },
track: true, //to turn on the track changes.
flexHeight: false,
showBottom:false,
dragColumns: { enabled: false },
virtualX:false,
showTitle: false,
scrollModel: {
autoFit: true
},
collapsible: { on: false, collapsed: false },
selectionModel: { type: 'none', subtype:'incr', cbHeader:false, cbAll:false},
editModel: {
saveKey: $.ui.keyCode.ENTER
},
beforeCheck:function( event, ui ) {
},
check:function( event, ui ) {
if($( "#tabs-2_tab_main" ).pqGrid( "isDirty", { rowIndx: ui.rowIndx})){
$("#tabs").tabs({ disabled: [0,1,2]});
}else{
// $("#tabs").tabs("enable");// on load of grid,the //enable function is not working.
// $('#tabs').tabs('option', 'active');
//$( "#tabs" ).tabs( "option", "disabled", [] );
//$("#tabs").attr("disabled",false)
$("#tabs").tabs({
activate: function (event, ui) {
$('#tabs').tabs('option', 'active').attr("href");
}//loading of grid working fine but enabling of other tabs is not working.
});
}
}
}
$("#tabs-2_tab_main").pqGrid(obj);
});
Note- The requirement of my issue is in a grid i.e in one tab, i have one Check box column and non Checkbox Column.If any of the row is getting modified the other tabs should get disabled otherwise enabled.When we have changed the non checkbox column after that if we modify the checkbox the tabs enabling are not happening.