Conditional row formating vs footer row summary

QuestionsConditional row formating vs footer row summary
Tomasz asked 11 years ago

Hi Abu,
Conditional formatting disappears when using footer summary e.g.
var opts = {
// e.g. to show footer summary
'loadComplete': function ()
{
var grid = $("#hrs");
sumqty = grid.jqGrid('getCol','qty',false,'sum');
grid.jqGrid('footerData','set', {qty:sumqty});
}
};

What can we do about it ?

Tomasz

1 Answers
Abu Ghufran answered 11 years ago

You can use alternate way of loadcomplete event.
Please refer demos/editing/custom-event.php

In php, you can connect onload event. (refer demo/editing/custom-event)

$e["js_on_load_complete"] = "do_onload";
$grid->set_events($e);

Then can use following JS code to select rows.

<script>
function do_onload(id)
{
var grid = $("#hrs");
sumqty = grid.jqGrid('getCol','qty',false,'sum');
grid.jqGrid('footerData','set', {qty:sumqty});
}
</script>

Your Answer

17 + 10 =

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?