|
Rank: Advanced Member Groups: Member
Joined: 10/21/2009 Posts: 39
|
When a grids EditCommandColumn edit button is clicked the row goes into edit mode for me. Now how can I detect whether the Update button or the Cancel button gets clicked in my ClientSideAfterEditItem javascript function?
|
|
Rank: Advanced Member Groups: Member
Joined: 10/21/2009 Posts: 39
|
Also is there a javascript way to know if anything has changed or been added in the grid when the Update button and the Cancel button get clicked. Something like a clientside version of the serverside ChangedItems and AddedItems properties.
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,194
|
Hi,
The second argument of your ClientSideAfterEditItem is true if Update is clicked, false if Cancel is clicked.
There is no single interface for you get a list of changed items or added items on the client side. If you need such a list, you must use ClientSideAfterEditItem to build such a list. Inside the handler you can compare the modified item's index with the initial total number of items in the Grid. If the item's index is greater than that value, then this is a newly added item and should go to your "AddedItems" collection. Otherwise it should go to your "ChangedItems" collection.
Your one year free tech support has actually expired recently, so you may want consider an upgrade to the current version. The upgrade cost $105 and it will give you a few new controls and also another year of free upgrade and tech support.
Thanks!
|
|
Rank: Advanced Member Groups: Member
Joined: 10/21/2009 Posts: 39
|
That will work for me but I cannot find an example in your docs or sample site that lists all the parameters of ClientSideAfterEditItem. Can you please let me know what they are are where to find parameters for the other clientside events as well.
Thanks.
|
|
Rank: Advanced Member Groups: Member
Joined: 10/21/2009 Posts: 39
|
I just placed an upgrade order, thanks for letting me know about that. I am calling grid.editItem in a javascript function and after the function executes, a post back occurs. How can I stop this postback from happening? I tried putting the grid in an ASP Update Panel but that didn't help. When I comment out the call to editItem, no postback occurs. Thanks.
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,194
|
Hi, Here is the parameters information for ClientSideAfterEditItem: http://doc.essentialobjects.com/library/1/jsdoc.public.handlers.grid_itemevent_handler.aspxTo find parameters for any client side event, just check the reference for that property in the document. For example, you will find a link to the above link the reference for ClientSideAfterEditItem: http://doc.essentialobjects.com/library/1/eo.web.grid.clientsideafteredititem.aspxWe are not aware that editItem would cause post back in any case. So the problem might originate from somewhere else. Try to comment other code out block by block and see if you can find out what it is. If not, try to isolate the problem into a test page and we will be happy to take a look. Please make sure the test page contains only code needed to reproduce the problem and runs independently. Thanks!
|
|