Jun 04, 2013, 10:23 AM
[CLOSED] "Itemclick" event is also firing while deselecting Check box column. How to prevent it from firing?
Hi,
I am loading dynamic grid as below and for brevity I have deleted some other code. whenever I am selecting record using check box column "Item Click event is not firing'...good even I want that. but when I deselect check box "ItemClick event is firing". How to prevent this? I am also using "deselectLock" property. Please help me in this regrad. Let me know if you want full view page code.
I am loading dynamic grid as below and for brevity I have deleted some other code. whenever I am selecting record using check box column "Item Click event is not firing'...good even I want that. but when I deselect check box "ItemClick event is firing". How to prevent this? I am also using "deselectLock" property. Please help me in this regrad. Let me know if you want full view page code.
function LoadGrid(orgID, levelID, levelName, levelNumber, region) {
var grid = Ext.create("Ext.grid.Panel", {
store: {
model: Ext.define("App.LevelModel" + levelID, {
extend: "Ext.data.Model",
fields: [{
name: "Organization_Id",
mapping: "Organization_Id",
type: "int"
}, {
name: "Organization_Desc",
mapping: "Organization_Desc",
type: "string"
}, {
name: "Parent_Organization_Id",
mapping: "Parent_Organization_Id",
type: "int"
}
, {
name: "Org_Level_Id",
mapping: "Org_Level_Id",
type: "string"
}, {
name: "Level_Number",
mapping: "Level_Number",
type: "int"
}, {
name: "Org_Level_Desc",
mapping: "Org_Level_Desc",
type: "string"
}, {
name: "Operating_Group_Id",
mapping: "Operating_Group_Id",
type: "int"
}, {
name: "Next_LevelID",
mapping: "Next_LevelID",
type: "int"
}, {
name: "Next_LevelName",
mapping: "Next_LevelName",
type: "string"
}
],
idProperty: "Organization_Id"
}),
storeId: "LevelStore" + levelID,
autoLoad: false,
readParameters: function (operation) {
return {
apply: {
"regionCSV": region,
"level": levelNumber,
"orgCSV": orgID
}
};
},
proxy: {
type: "ajax",
reader: {
type: "json",
root: "data"
},
url: '@(Url.Action("GetOrgsWithLevelInfo", "Talent"))'
}
},
id: "grdLevel_" + region + "_" + levelID,
border: false,
cls: "grd-existing-goals",
height: 280,
renderTo: "div_" + region + "_" + levelID + '_' + levelNumber,
columns: {
items: [{
dataIndex: "Organization_Desc",
text: levelName
}
]
},
emptyText: "No records found.",
listeners: {
itemclick: function (dataview, record, item, index, e) {
OrganizationClick(dataview, record, item, index, e);
}
},
selModel: window.App.chkLevelSelect = Ext.create("Ext.selection.CheckboxModel", {
proxyId: "chkOrgsSelect" + levelID,
selType: "checkboxmodel",
listeners: {
deselect: {
fn: function (item, record, index) {
if (!this.deselectLock) {
OrgDeselect(this, record, index);
}
}
},
select: {
fn: function (item, record, index) {
if (!this.selectLock) {
OrgSelect(this, record, index);
}
}
}
},
checkOnly: true
}),
selectionMemory: false
});
grid.getStore().on("load", function (store, records, successful) {
SelectGoalOrg(this, store, records, successful);
}, grid);
grid.getStore().load();
}
Last edited by Daniil; Jun 05, 2013 at 10:24 AM.
Reason: [CLOSED]