views:

340

answers:

1

I have a Telerik RadGrid that is bound to a Linq Datasource. On the intial page load, the data shows up fine in the RadGrid. If I remain on Page 1 and filter the data, it shows correctly. However, if I go to page 2 or 3 or any page but the first 1 and filter the data, it does not display in the RadGrid. I examined the sql that linq is generating in the immediate window and it is generating the proper sql and bringing back results, but it is not displaying in the radgrid when I page to any page but the first.

A: 

There is a problem with RadGrid filter expression.

You need to reset the FilterExpression by storing the expression in the ViewState(may be OnSelect event of the LinqDataSource) and then on PreRender event of the page you need to restore the FilterExpression from the stored ViewState.

Hope this helps.

You can refer this link http://www.telerik.com/community/forums/aspnet-ajax/grid/maximum-rows-parameter-with-filtering.aspx

dhinesh