Welcome Guest Search | Active Topics | Sign In | Register

Grid Table detecting cell changes Options
abrea
Posted: Thursday, October 23, 2008 4:29:07 AM
Rank: Member
Groups: Member

Joined: 7/12/2008
Posts: 19
Is it possible to run a client side script when the cell focus has changed to a new cell. Is there an eventhandler or some other methd that can b called when the focus of the cell changes.
eo_support
Posted: Thursday, October 23, 2008 5:01:30 AM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,194
Hi,

I believe you can do that with this property:

http://www.essentialobjects.com/ViewDoc.aspx?t=EO.Web.Grid.ClientSideOnCellSelected.html

It will be something like this:

Code: HTML/ASPX
<eo:Grid ClientSideOnCellSelected="your_handler" ....>
....
</eo:Grid>


Here your_handler is a JavaScript you would provide.

Hope this helps.

Thanks!
abrea
Posted: Thursday, October 23, 2008 6:36:29 AM
Rank: Member
Groups: Member

Joined: 7/12/2008
Posts: 19
Thanks you, I think it will. But, is there an eventhandler when a cell loses focus, or am I asking for to much.
eo_support
Posted: Thursday, October 23, 2008 6:42:15 AM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,194
Sorry. You are asking too much. :) You can however use a global variable to remember the last selected cell row and column (do not store the cell object itself because that a new cell object is created every time you request a cell). Then you can check the newly selected cell's row and column inside your handler. If you see it changes, then a lost focus for the previous cell has occurred.
abrea
Posted: Thursday, October 23, 2008 7:11:54 AM
Rank: Member
Groups: Member

Joined: 7/12/2008
Posts: 19
What is the purpose of the Grid.ClientSideAfterEditItem Property? When or what causes it to be raised? Is this triggered after each cell have been edited? If so when is an item considered to have completed editing.
eo_support
Posted: Thursday, October 23, 2008 7:18:34 AM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,194
Hi,

The purpose of that property is to allow you to be notified when a row has been edited. Consider the following sequence:

1. User click "Edit" of a EditCommandColumn to put the row into edit mode;
2. User makes some changes;
3. User click "Update" to save the changes;

ClientSideAfterEditItem would be called after step 3. At which point you will be able to exam the new value and possibly perform some cross validation. For example, if you see one cell's value does not match another cell's value, you can change it to another value that matches.

Hope this helps.

Thanks


You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.