onCellSelect not firing

QuestionsonCellSelect not firing
Martin Abrica Mata asked 4 years ago

after update @version 2.6.3 build 20200917-1013 onCellSelect is not firing,

5 Answers
Abu Ghufran Staff answered 4 years ago

Hi,

Please try replacing onCellSelect with onSelectCell. There seems to be a confusion in api, where first is called only on mouse selection and later works on keyboard/mouse selection both.

$grid[“onSelectCell”] = “function(rowid, celname, value, iRow, iCol){ alert(‘onSelectCell’); }”;
$g->set_options($grid);

 

_________________________
Abu Ghufran - Dev Team
Grid 4 PHP Framework
 
Martin Mata answered 4 years ago

var opts =
{
‘onSelectCell’: function (rowid,icol,cellcontent)
{
alert(“celected”);
if(icol == 1)
{
parent.$(‘#codigo’).val(cellcontent);
var e = jQuery.Event(“keydown”);
e.which = 13;
parent.$(‘#codigo’).trigger(e);
self.close();
parent.$.colorbox.close();
}
else
{
parent.$(‘#codigo’).val(jQuery(‘#list1’).jqGrid(‘getCell’, rowid, ‘ProCodigo’));
var e = jQuery.Event(“keydown”);
e.which = 13;
parent.$(‘#codigo’).trigger(e);
self.close();
parent.$.colorbox.close();
}
}
}

Martin Mata answered 4 years ago

Still not firing

Abu Ghufran Staff answered 4 years ago

The var opts = { … }; method is not recommended as it removed all previous grid options. Best way to do is using set_options() method as in reply #2.

_________________________
Abu Ghufran - Dev Team
Grid 4 PHP Framework
 
Martin Mata answered 4 years ago

Thanks, I am using the set_options() and it is working just fine.

Regards

Your Answer

9 + 8 =

Login with your Social Id:

OR, enter

Attach code here and paste link in question.
Attach screenshot here and paste link in question.



How useful was this discussion?

Click on a star to rate it!

Average rating 0 / 5. Vote count: 0

No votes so far! Be the first to rate it.

We are sorry that this post was not useful for you!

Let us improve this post!

Tell us how we can improve this post?