My Technical Notes

Monday, 15 July 2013

Utility of RaiseViewChanged() method

On an IQueryableDataSource we have the RaiseViewChanged() method. This can be used when you have a bunch of FilterExpressions which you want to kick in, in response to a button click etc.

Typically you would write a method like the following and call it in multiple places:

protected void RaisedViewChanged(object sender, EventArgs e)
    GridView1.PageIndex = 0;
    (GridDataSource as IQueryableDataSource).RaiseViewChanged();

No comments: