melvyn
Posts: 333
|
| Posted: 04/16/2007, 7:48 AM |
|
Hello all,
Time reading here, now my first post:
Is there a way to automatically refresh a grid? Not talking about page refresh, simply grid refresh.
Is there a way to pickup records from the grid without reloading the entire page?
My case is the following:
Remote users insert records into a table. Admin users review those records in a grid and check them to aprove/reject the record.
The issue come because several people are working at admin location and some restrictions have been applied trying to avoid 2 admins taking the same record. Well, I've created a field to determine when a record have been taken by an admin. Only those records not taken by admins are shown. The page reloads each 5 seconds.
Until that everything is ok. The problem: the homepage reloading each 5 seconds bother the users.
Is there a way to pickup records from the grid without reloading the entire page? At top of page there are menu and it's difficult to select something when page is reloading constantly.
Thanks in advance
_________________
Melvyn Perez
Puro Codigo
http://purocodigo.com |
 |
 |
Hidran
|
| Posted: 04/16/2007, 9:01 AM |
|
You can use ajax to query the database to see if there are new records
availables
and refresh just the grid with javascript.Of course, you would have
to put a periodical updater and send request to server .
Hidran
"melvyn" <melvyn@forum.codecharge> ha scritto nel messaggio
news:546238cadef453@news.codecharge.com...
> Hello all,
>
> Time reading here, now my first post:
> Is there a way to automatically refresh a grid? Not talking about page
> refresh,
> simply grid refresh.
>
> Is there a way to pickup records from the grid without reloading the
> entire
> page?
>
> My case is the following:
>
> Remote users insert records into a table. Admin users review those records
> in a
> grid and check them to aprove/reject the record.
>
> The issue come because several people are working at admin location and
> some
> restrictions have been applied trying to avoid 2 admins taking the same
> record.
> Well, I've created a field to determine when a record have been taken by
> an
> admin. Only those records not taken by admins are shown. The page reloads
> each 5
> seconds.
>
> Until that everything is ok. The problem: the homepage reloading each 5
> seconds
> bother the users.
>
> Is there a way to pickup records from the grid without reloading the
> entire
> page? At top of page there are menu and it's difficult to select something
> when
> page is reloading constantly.
>
> Thanks in advance
> ---------------------------------------
> Sent from YesSoftware forum
> http://forums.yessoftware.com/
>
|
|
|
 |
Benjamin Krajmalnik
|
| Posted: 04/16/2007, 10:26 AM |
|
And exactly how do you want him to update the grid via Javascript?
Granted this is doable if he were to encompass hi grid inside a div and use
inner html, but instead of leveraging CodeCharge to handle the presentation
layer, he now has to rewrite it.
In short, the CodeCharge model is not compatible with a redisplay of only
the grid in a page. This could be accomplished if the grid were actually an
iframe (where you could trigger a refresh of the Iframe), but I think it is
overkill.
|
|
|
 |
wkempees
Posts: 1679
|
| Posted: 04/16/2007, 3:20 PM |
|
Have you tried to:
put your grid in an IFrame on the page you are working on.
Then give the Iframe the dynamic refresh ?
Not tested (yet)
_________________
Origin: NL, T:GMT+1 (Forumtime +9)
CCS3/4.01.006 PhP, MySQL .Net/InMotion(Vista/XP, XAMPP)
if you liked this info PAYPAL me: http://donate.consultair.eu
|
 |
 |
Damian Hupfeld
|
| Posted: 04/16/2007, 5:45 PM |
|
That will work but it doesnt really solve his problem as it is teh
refreshing that is bugging his users.
I think Benjamin is correct in his response that this is not supported.
I think that very few applications - even desktop - will provide this
functionaility in the 5second timeframe that he is talking about.
This is just some ideas - far from tested or even fully thought thru -
Add another field to your table called Actioned
Do some custom code on the Before Show of the Grid to compare the UserID of
the person opening the record with the value in the Actioned field.
If blank - add the current Admin's ID and save row and then pull data.
If value present compare it against current user. If different warn the
Admin that someone else has or is editing this record and prompt them to
continue or exit.
If value same as current Admin let them continue.
Need to also give an Admin the ability to clear his ID if he does not in
fact action the record.
Hmmm....
"wkempees" <wkempees@forum.codecharge> wrote in message
news:54623f6ae138b3@news.codecharge.com...
> Have you tried to:
>
> put your grid in an IFrame on the page you are working on.
> Then give the Iframe the dynamic refresh ?
> Not tested (yet)
> ---------------------------------------
> Sent from YesSoftware forum
> http://forums.codecharge.com/
>
|
|
|
 |
damian
Posts: 838
|
| Posted: 04/22/2007, 6:21 AM |
|
There are a couple of replies to this in the newsgroup version....
Anyway - here is mine - maybe it will and maybe it wont help - the initial response is to W.
That will work but it doesnt really solve his problem as it is the refreshing that is bugging his users.
I think Benjamin is correct in his response that this is not supported.
I think that very few applications - even desktop - will provide this functionaility in the 5second timeframe that he is talking about.
This is just some ideas - far from tested or even fully thought thru -
Add another field to your table called Actioned
Do some custom code on the Before Show of the Grid to compare the UserID of the person opening the record with the value in the Actioned field.
If blank - add the current Admin's ID and save row and then pull data.
If value present compare it against current user. If different warn the Admin that someone else has or is editing this record and prompt them to continue or exit.
If value same as current Admin let them continue.
Need to also give an Admin the ability to clear his ID if he does not in fact action the record.
Hmmm....
_________________
if you found this post useful take the time to help someone else.... :)
|
 |
 |
melvyn
Posts: 333
|
| Posted: 04/23/2007, 4:54 AM |
|
Sincerely, I used the iframe recomendation.
The goal is to have and updated grid. I mean: when a user click some records at some location, the another users must not see that record anymore. Reload it, refresh it, use of ajax, are all valid suggestion. Which of them are friendly with codecharge?
Working with desktop is nice sending the update request from the server to the client machines when some row change. Other way is setting a service that put the dataset available to client machines.
Anyways, desktop is different. Working with PHP.
The iframe is doing the dirty job by now. A new problem is appearing, but I'm not sure if tha't because the iframe: sometimes, when users insert or update any record, they must be redirected to one of the pages containing the grid. They reach a page with nothing in it. Simply a blank page. They've reported me that, and sent screenshots. That behavior doesn't happen before iframe.
Any idea?
Thank you.
Melvyn
_________________
Melvyn Perez
Puro Codigo
http://purocodigo.com |
 |
 |
username
Posts: 24
|
| Posted: 09/13/2007, 4:03 AM |
|
Thanks
does any body have any example for ajax in ccs php
please give me example for ajax ccs php
amir.emai [at]yahoo.com
|
 |
 |
|