Welcome Guest Search | Active Topics | Sign In | Register

Sorting by individual coloumn in Grid calls ClientSideOnItemSelected event Options
kevin2themystic
Posted: Friday, October 22, 2010 12:43:09 PM
Rank: Newbie
Groups: Member

Joined: 10/21/2010
Posts: 6
Hello,

I have a grid where I have set some columns AllowSort property to true and I also have a JavaScript function that handles the ClientSideOnItemSelected event. I am finding that when I sort the column, the ClientSideOnItemSelected event gets fired.

Is this expected behaviour? And if so, can someone recommend a way to find out if the column has been sorted vs. the record has been selected by the user?

Thanks,
Kevin Parkinson
eo_support
Posted: Friday, October 22, 2010 2:31:58 PM
Rank: Administration
Groups: Administration

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

Yes. This behavior is by design. The reason is some users need to track the current selected item index. Once it has been sorted, the selected item index will change. So we fire ClientSideOnItemSelected again to notify user that a "new item" has been selected.

There is no easy way to distinguish the two. The only difference between the two cases is if it is triggered by sort, then after ClientSideOnItemSelected is fired, ClientSideOnSort will also be fired. However ClientSideOnSort is fired AFTER ClientSideOnItemSelected is fired. So if you really need to distinguish these two cases, you will need to set a timer in ClientSideOnItemSelected, then check whether ClientSideOnSort has been "recently" fired inside that timer.

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.