Select row on load page

QuestionsSelect row on load page
Gabriel Brezuica asked 6 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 6 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 5 years ago

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

Javier answered 4 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 + 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 / 5. Vote count:

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

Let us improve this post!