JQGrid update grid or single row

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

JQGrid update grid or single row

Sabine Manaa
Hi,

I use JQWidgetBox and want to update the grid with data (which has changed outside).
How can I force the whole Grid to update?
How can I reload only one row?

It is something with
http://www.trirand.com/jqgridwiki/doku.php?id=wiki%3Amethods
trigger("reloadGrid")

but I have no idea how to call this from smalltalk.
Sabine
Reply | Threaded
Open this post in threaded view
|

Re: JQGrid update grid or single row

Paul DeBruicker
Looks like this might work:

(html jQuery id: 'myJQGrid') call:'trigger' with:'reloadGrid'.





On 09/15/2012 05:23 AM, Sabine Knöfel wrote:

> Hi,
>
> I use JQWidgetBox and want to update the grid with data (which has changed
> outside).
> How can I force the whole Grid to update?
> How can I reload only one row?
>
> It is something with
> http://www.trirand.com/jqgridwiki/doku.php?id=wiki%3Amethods
> trigger("reloadGrid")
>
> but I have no idea how to call this from smalltalk.
> Sabine
>
>
>
> --
> View this message in context: http://forum.world.st/JQGrid-update-grid-or-single-row-tp4647572.html
> Sent from the Seaside General mailing list archive at Nabble.com.
> _______________________________________________
> seaside mailing list
> [hidden email]
> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
>

_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

Re: JQGrid update grid or single row

Sabine Manaa
Sorry, I did not succeed with your code.
I suceeded in using the code below.

Now I have the problem, that with one click at the button, I want to do 2 things:
1) do some saving of my data (prototype)
2) update the grid (jQuery)
Normally both should be done within the onClick: event.
But I can do only one thing within the onClick, so I encroached the onFocus: event.

I dont like this.

Anyone having a better way for this?
Sabine
-------------------------------------------------------------------------
html button
        onClick: (JSStream on: 'jQuery("#gridID").trigger("reloadGrid",[{page:1}]);');
        onFocus:
                (html prototype evaluator
                        callback: [ :script |
                                    self save.....
                                    self update....
                                     ];
                        return: false);
        disabled: self isSaveButtonEnabled not;
        script: (html jQuery this button primaryIcon: self iconSave);
       with: 'save and update'.

On Sat, Sep 15, 2012 at 4:41 PM, Paul DeBruicker [via Smalltalk] <[hidden email]> wrote:
Looks like this might work:

(html jQuery id: 'myJQGrid') call:'trigger' with:'reloadGrid'.





On 09/15/2012 05:23 AM, Sabine Knöfel wrote:

> Hi,
>
> I use JQWidgetBox and want to update the grid with data (which has changed
> outside).
> How can I force the whole Grid to update?
> How can I reload only one row?
>
> It is something with
> http://www.trirand.com/jqgridwiki/doku.php?id=wiki%3Amethods
> trigger("reloadGrid")
>
> but I have no idea how to call this from smalltalk.
> Sabine
>
>
>
> --
> View this message in context: http://forum.world.st/JQGrid-update-grid-or-single-row-tp4647572.html
> Sent from the Seaside General mailing list archive at Nabble.com.
> _______________________________________________
> seaside mailing list
> [hidden email]
> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
>

_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside



If you reply to this email, your message will be added to the discussion below:
http://forum.world.st/JQGrid-update-grid-or-single-row-tp4647572p4647576.html
To unsubscribe from JQGrid update grid or single row, click here.
NAML

Reply | Threaded
Open this post in threaded view
|

Re: JQGrid update grid or single row

John McKeon
Hi Sabine,
You can send more than one onClick: (). They execute in the order they are defined so you would move the onFocus: code before the existing onClick:
 
html button
   onClick: (html prototype evaluator...);
   onClick: (JSStream on...);
   with: &etc.
 
Regarding the trigger script Johan suggested, maybe you need to add the additional argument using with: with: or one of it variants. It will probably look complex as you need an array of JSon objects but it would allow you to determine the page dynamically?
 
Hope this helps
 
John
On Tue, Sep 18, 2012 at 8:18 AM, Sabine Knöfel <[hidden email]> wrote:
Sorry, I did not succeed with your code.
I suceeded in using the code below.

Now I have the problem, that with one click at the button, I want to do 2 things:
1) do some saving of my data (prototype)
2) update the grid (jQuery)
Normally both should be done within the onClick: event.
But I can do only one thing within the onClick, so I encroached the onFocus: event.

I dont like this.

Anyone having a better way for this?
Sabine
-------------------------------------------------------------------------
html button
        onClick: (JSStream on: 'jQuery("#gridID").trigger("reloadGrid",[{page:1}]);');
        onFocus:
                (html prototype evaluator
                        callback: [ :script |
                                    self save.....
                                    self update....
                                     ];
                        return: false);
        disabled: self isSaveButtonEnabled not;
        script: (html jQuery this button primaryIcon: self iconSave);
       with: 'save and update'.

On Sat, Sep 15, 2012 at 4:41 PM, Paul DeBruicker [via Smalltalk] <[hidden email]> wrote:
Looks like this might work:

(html jQuery id: 'myJQGrid') call:'trigger' with:'reloadGrid'.





On 09/15/2012 05:23 AM, Sabine Knöfel wrote:

> Hi,
>
> I use JQWidgetBox and want to update the grid with data (which has changed
> outside).
> How can I force the whole Grid to update?
> How can I reload only one row?
>
> It is something with
> http://www.trirand.com/jqgridwiki/doku.php?id=wiki%3Amethods
> trigger("reloadGrid")

>
> but I have no idea how to call this from smalltalk.
> Sabine
>
>
>
> --
> View this message in context: http://forum.world.st/JQGrid-update-grid-or-single-row-tp4647572.html
> Sent from the Seaside General mailing list archive at Nabble.com.
> _______________________________________________
> seaside mailing list
> [hidden email]
> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
>

_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside



If you reply to this email, your message will be added to the discussion below:
http://forum.world.st/JQGrid-update-grid-or-single-row-tp4647572p4647576.html
To unsubscribe from JQGrid update grid or single row, click here.
NAML



View this message in context: Re: JQGrid update grid or single row

Sent from the Seaside General mailing list archive at Nabble.com.

_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside




--
jmck.seasidehosting.st

_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

Re: JQGrid update grid or single row

Sabine Manaa
Hi John,

ups - so easy :-). Thank you, this is a sufficient solution for me.

Sabine

On Tue, Sep 18, 2012 at 3:49 PM, John McKeon [via Smalltalk] <[hidden email]> wrote:
Hi Sabine,
You can send more than one onClick: (). They execute in the order they are defined so you would move the onFocus: code before the existing onClick:
 
html button
   onClick: (html prototype evaluator...);
   onClick: (JSStream on...);
   with: &etc.
 
Regarding the trigger script Johan suggested, maybe you need to add the additional argument using with: with: or one of it variants. It will probably look complex as you need an array of JSon objects but it would allow you to determine the page dynamically?
 
Hope this helps
 
John
On Tue, Sep 18, 2012 at 8:18 AM, Sabine Knöfel <[hidden email]> wrote:
Sorry, I did not succeed with your code.
I suceeded in using the code below.

Now I have the problem, that with one click at the button, I want to do 2 things:
1) do some saving of my data (prototype)
2) update the grid (jQuery)
Normally both should be done within the onClick: event.
But I can do only one thing within the onClick, so I encroached the onFocus: event.

I dont like this.

Anyone having a better way for this?
Sabine
-------------------------------------------------------------------------
html button
        onClick: (JSStream on: 'jQuery("#gridID").trigger("reloadGrid",[{page:1}]);');
        onFocus:
                (html prototype evaluator
                        callback: [ :script |
                                    self save.....
                                    self update....
                                     ];
                        return: false);
        disabled: self isSaveButtonEnabled not;
        script: (html jQuery this button primaryIcon: self iconSave);
       with: 'save and update'.

On Sat, Sep 15, 2012 at 4:41 PM, Paul DeBruicker [via Smalltalk] <[hidden email]> wrote:
Looks like this might work:

(html jQuery id: 'myJQGrid') call:'trigger' with:'reloadGrid'.





On 09/15/2012 05:23 AM, Sabine Knöfel wrote:

> Hi,
>
> I use JQWidgetBox and want to update the grid with data (which has changed
> outside).
> How can I force the whole Grid to update?
> How can I reload only one row?
>
> It is something with
> http://www.trirand.com/jqgridwiki/doku.php?id=wiki%3Amethods
> trigger("reloadGrid")

>
> but I have no idea how to call this from smalltalk.
> Sabine
>
>
>
> --
> View this message in context: http://forum.world.st/JQGrid-update-grid-or-single-row-tp4647572.html
> Sent from the Seaside General mailing list archive at Nabble.com.
> _______________________________________________
> seaside mailing list
> [hidden email]
> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
>

_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside



If you reply to this email, your message will be added to the discussion below:
http://forum.world.st/JQGrid-update-grid-or-single-row-tp4647572p4647576.html
To unsubscribe from JQGrid update grid or single row, click here.
NAML



View this message in context: Re: JQGrid update grid or single row

Sent from the Seaside General mailing list archive at Nabble.com.

_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside




--
jmck.seasidehosting.st


_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside



If you reply to this email, your message will be added to the discussion below:
http://forum.world.st/JQGrid-update-grid-or-single-row-tp4647572p4647978.html
To unsubscribe from JQGrid update grid or single row, click here.
NAML