jqGrid loadComplete select row question

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

jqGrid loadComplete select row question

Sabine Manaa
Hi,

I use jQGrid and want that after loadComplete a certain row is selected, (the row is set in my model).
If I test this with a), it works, but it is always the same object/row selected (7864354):

a)
html table
        script:
                (html jQuery this grid
                        onSelectRow:...
                        loadComplete: (JSStream on: 'jQuery("#gridID").setSelection(''7864354'');');
...
               
                                                                       
For selecting the object from my model, I have to pass the number of the object to select.

But if I try this b), it does not work.

...
loadComplete: (html jQuery ajax
        callback: [:script |  
                 JSStream on: ('jQuery("#gridID").setSelection(''{1}'');' format: { script})  ]
        value: (self reloadButtonJavaScriptObject)) ;

If I inspect the result of
 ('jQuery("#gridID").setSelection(''{1}'');' format: { script})
this is fine, as in a),
==> ('jQuery("#gridID").setSelection(''7864354'');')

But there must be something wrong with the kind I call it.

Can anyone give me a hint?

Regards
Sabine
Reply | Threaded
Open this post in threaded view
|

Re: jqGrid loadComplete select row question

Sabine Manaa
For other lost jQuery souls :-) I can answer my question now by myself:

loadComplete:
(html jQuery ajax script: [ :s | s << (s jQuery: #gridID) call: 'setSelection' with: self reloadButtonJavaScriptObject ]);

Sabine