| View previous topic :: View next topic |
| Author |
Message |
Djamahl
Joined: 19 Mar 2008 Posts: 3
|
Posted: Fri Feb 27, 2009 4:42 am Post subject: Edit mode for Grid with Database data |
|
|
I realize that by default Grid will not update back to a database when using edit mode. But I wrongfully expected that when I tried to process the post action from the form, that it would work properly.
But, when a user presses the Edit button on the actionbar it attempts to process the POST at that point instead of after pressing Update.
What am I doing wrong here? |
|
| Back to top |
|
 |
Djamahl
Joined: 19 Mar 2008 Posts: 3
|
Posted: Wed May 13, 2009 2:02 am Post subject: |
|
|
Hello?  |
|
| Back to top |
|
 |
support Site Admin
Joined: 01 Jan 1970 Posts: 79
|
Posted: Wed May 13, 2009 5:03 am Post subject: |
|
|
All of the grid actions are posted to the server. When the user clicks the Edit button, the action is posted to the server, but there's really nothing special you need to do since the grid will go into edit mode by itself.
It's only when the user clicks the Update button where you should do something. When you receive the post on the server, you can check the action to see that it is an Update action. When it is, then you can grab the data that the user typed in, construct a SQL statement, and update the corresponding row in the database.
For a working example with code, please refer to:
http://www.dotjonline.com/taglib/grid/gridEditMode.jsp _________________ - support |
|
| Back to top |
|
 |
|