Trigger Conditional Format from script

QuestionsTrigger Conditional Format from script
Lars Erik Løvhaug asked 9 years ago

Hi

I have three grids, and I do a manual update of a count value in the main grid when I update the subgrid. There is conditional formatting of a cell in the parent grid.

Then I update the the subgrid, I also change the value of the parent field using javascript. I'd like to trigger the conditional formatting of that particular row, or for the whole grid if that's easier. Right now, it seems the formatting is rendered in the loadcomplete-trigger.
If the formatting was contained in it's own function or event, it could be possible to trigger it manually when requested.

Would this be possible?

1 Answers
Abu Ghufran answered 9 years ago

You can reload parent grid on subgrid submit event. This will apply formatting again.

In subgrid, you can put following:

$grid["onAfterSave"] = "function(){ jQuery('#list1').trigger('reloadGrid',[{jqgrid_page:1}]); }";
$g->set_options($grid);

where list1 is parent grid id.

Your Answer

7 + 0 =

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?