views:

27

answers:

2

i'm using a Telerik Radgrid on ASP.Net 3.5 and whenever I postback, the selectedindex is gone. I also used the NeedDataSource event to bind my data, and I do feel it may be related to that. is there a way to use both seamlessly without viewstate?

A: 

Hm, that's strange, as this is not the case here: http://demos.telerik.com/aspnet-ajax/grid/examples/programming/needdatasource/defaultcs.aspx

when you change the skin with postback from the dropdown in the top right corner. Also, in case you postback from ajaxified control, make sure the grid is updated on postback as well.

Dick

Dick Lampard
that's the thing. after I do a postback, it does a NeedDataSource event and the selected row is removed.
Martin Ongtangco
A: 

Regular postback should not fire NeedDataSource and rebind grid. If you sort, page, filter, etc. the grid, consider this solution.

Dick

Dick Lampard