Hello!
I placed a grid into my app. I want to automatically select first row in the grid immediately after it have been displayed. I tried: $$(‘myGrid’).select(0); but nothing happened.
Hello!
I placed a grid into my app. I want to automatically select first row in the grid immediately after it have been displayed. I tried: $$(‘myGrid’).select(0); but nothing happened.
Try to use
$$('myGrid').select( $$('myGrid').first() );
Thank You for quick reply!
That was the first I tried. No success
Here is the example: http://varroda.csip.eu/gridTest.php
You are using
{ view: 'grid', datatype: 'json', url: 'dsDolgozoGrid.php',
which loads data in grid by separate ajax request, data loading in such case is async, which means you need to call selection api only after data loading. It can be done as
{ view: 'grid', datatype: 'json', url: 'dsDolgozoGrid.php', ready:function(){ this.select(this.first()); }
Basically it calls the same code, just do it in different moment of time
You’re always right Master!
Thank You!