Welcome Guest Search | Active Topics | Sign In | Register

Trapping the Selected Row Index in C# Options
Chris
Posted: Wednesday, June 17, 2009 3:43:38 PM
Rank: Member
Groups: Member

Joined: 4/29/2009
Posts: 13
Hi,

I am running my Grid Clientside. Is there a way to trap the selected row index? I am looking for an equivalent to the ClientSideOnItemSelected to be used in my C# code.

Thanks
Chris
eo_support
Posted: Wednesday, June 17, 2009 3:51:49 PM
Rank: Administration
Groups: Administration

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

I don't think there is one. :) The closest is this property:

http://doc.essentialobjects.com/library/1/eo.web.grid.selecteditemindex.aspx

You can probably try to save the previous value into view state and then when the page comes back, check the new value against the previous saved value. If they are not the same, then carry out whatever logic you would like to trigger by this situation.

Thanks!
Chris
Posted: Wednesday, June 17, 2009 4:05:38 PM
Rank: Member
Groups: Member

Joined: 4/29/2009
Posts: 13
Thanks for the suggestion.

I thnk I found a quicker way.

I wired-up the ClientSideOnItemSelected to a javascript function which gives me the item index From there I then invoke the event

grid.raiseItemCommandEvent(index, "DUMMY");

This then fires on the C# side and I trap the event Grid_ItemCommand which carries the Item.Index in the GridCommandEventArgs!

Cheers
Chris
eo_support
Posted: Wednesday, June 17, 2009 4:08:51 PM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,194
Nice work. :) Yes. That will do it!


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.