if I have a row selected (this is done to view and image in a rad window) and then
I hit a column header to sort, the selected index change event is fired
and the previous selected row fires off and shows the image again.
how can I stop this from happening.
Thanks Troy
1 Answer, 1 is accepted
0
Konstantin Dikov
Telerik team
answered on 03 Mar 2015, 12:56 PM
Hello Troy,
The server-side OnSelectedIndexChanged event will fire as soon as a postback occurs (regardless of the initiator). If you are performing a client-side selection, when you sort the grid through a column's header, a postback will occur and the OnSelectedIndexChanged will fire.
However, if you are setting the EnablePostBackOnRowClick property to true, once you click on a row, the server-side OnSelectedIndexChanged event will fire and when you sort afterwords, the event will not fire a second time.
Following is a simple example demonstrating that the event will fire only once:
Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.