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

Two Q: Is there a Filter Event?

1 Answer 59 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Lee
Top achievements
Rank 1
Lee asked on 18 Aug 2011, 04:27 AM
Hi

Question1: I was under impression that Grid control by default used Ajax features, and any action on grid will produce ajax like behaviour as seen in demos.  but I observe that it does postbacks.   what i am missing.

Question2: I am using following code in Page_Load Event to bind datasouce to grid,
if (!Page.IsPostBack)
          {
              MembershipUserCollection uc = Membership.GetAllUsers();
              RadGrid1.DataSource = uc;
              RadGrid1.DataBind();
               
          }

Then while running code, when I select filter the grid goes blank.  I understnad that on postback DataSource is lost, so
1. Is there a filter event where i can assing DataSource back to grid.
2. I would prefer, if there is a way to do filter at client-side itself.

Regards

1 Answer, 1 is accepted

Sort by
0
Accepted
Princy
Top achievements
Rank 2
answered on 18 Aug 2011, 04:49 AM
Hello Lee,

In order to implement advanced features in RadGrid like paging, filtering etc RadGrid requires advanced data binding using NeedDataSource event. Check the following help documentation which explains more about this.
Advanced Data-binding (using NeedDataSource event).

Also check the following demo which implements filtering from client side.
Grid / Declarative Binding.

Thanks,
Princy.
Tags
Grid
Asked by
Lee
Top achievements
Rank 1
Answers by
Princy
Top achievements
Rank 2
Share this question
or