This is a migrated thread and some comments may be shown as answers.

modify FilterExpression server side

1 Answer 91 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Riaan
Top achievements
Rank 1
Riaan asked on 26 Feb 2009, 11:02 AM

Good day there,

I would like to modify my filter expression on the server side in c#. The problem is that my radgrid rgAuditTrails_NeedDataSource event is not firing. I am declaring the events correctly as such;

  <telerik:RadGrid ID="rgAuditTrails" AllowFilteringByColumn="true" 
runat="server" SkinID="MySkin" ClientSettings-Selecting-AllowRowSelect="true"
AutoGenerateColumns="False" GridLines="None" AllowPaging="True" 
DataSourceID="dsAuditTrails" PageSize="15" 
onitemcommand="rgAuditTrails_ItemCommand" 
onneeddatasource="rgAuditTrails_NeedDataSource
">

and I am making sure that EnableViewState="True" here.

  <MasterTableView EnableViewState="true" DataKeyNames="AuditTrailID" DataSourceID="dsAuditTrails">

Could you perhaps come with any suggestions.

Thanks

RB

1 Answer, 1 is accepted

Sort by
0
Shinu
Top achievements
Rank 2
answered on 27 Feb 2009, 05:12 AM
Hi Riaan,

Try setting the FilterExpression  in the  PreRender event of the Grid and see whether it is working. Also make sure that you have not set the EnableLinqExpressions  to true. If this does not help consider sending the code in the NeedDataSource event.

Shinu
Tags
Grid
Asked by
Riaan
Top achievements
Rank 1
Answers by
Shinu
Top achievements
Rank 2
Share this question
or