I am working on jqxTreeGrid. I have a row with four fields. Name, Org, Phone and Select Preference (This is a dropdown). Now when ever i click on a particular row / cell, it selects that row and i save the row data to a local array.
My problem here is the 4th column. If i click on that column (dropdown) i don't want the rowSelect event to be fired because of the following reasons:
- It deselects a all previously selected rows which I ofcourse don't want to happen.
- It selects a row but my intention is to set the value of dropdown for that row.
I want nothing should happen as i am only selecting the value from preference dropdown.
I went though this post : JQGrid Not select row when clicking in a particular cell but it is not helping as jqxTreeGrid doesnot have this method.
I tried the following approach but its not working for me.
$('#ad_sendAlert_jqxGrid').on('rowClick',function(event){
// event args.
var args = event.args;
// row data.
var row = args.row;
// row key.
var key = args.key;
// data field
var dataField = args.dataField;
if(dataField === 'alertpreference'){
event.preventDefault();
//event.stopPropagation();
return false;
}
});
And this is my rowSelect method:
$('#ad_sendAlert_jqxGrid').on('rowSelect',function(event){
// event args.
var args = event.args;
// row data.
var row = args.row;
// row key.
var key = args.key;
if(row.level !== 0){
var selectedUser = self.tempUserList[row.id];
self.addUserToList(selectedUser);
}
self.renderUserCount();
});