Select row on load page

QuestionsSelect row on load page
Gabriel Brezuica asked 11 years ago

How can I set the selected row (first row) on load page? I want the first row be selected in order to show the data in subgrid.

Thanks in advance

3 Answers
Abu Ghufran answered 11 years ago

Following config will open the first row of subgrid on load event. You can customize as per your need.

PHP:
$e["js_on_load_complete"] = "grid_onload";
$grid->set_events($e);

JS:
function grid_onload(ids)
{
var ids = $("#list1").jqGrid('getDataIDs');
$("#list1").expandSubGridRow(ids[0]);
}

Abu Ghufran answered 10 years ago

Events are supported in full version. You can buy from download page.

Javier answered 9 years ago

Hi. Sorry my english is very poor. I have a next code:
$g = new jqgrid();
$e["js_on_select_row"] = "do_onselect";
$g->set_events($e);

This dont work. I write the script do_onselect in <body>, but the page not show.
If iam comment the line $g->set_events($e), the contennt of page is show.
Help me.
Thanks

Your Answer

14 + 4 =

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?