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

Filter should get new records from database everytime

4 Answers 53 Views
Filter
This is a migrated thread and some comments may be shown as answers.
Rajasekhar
Top achievements
Rank 1
Rajasekhar asked on 15 Sep 2011, 07:33 AM
Hi,

  Generally filter works on the binded dataset, but i have a situation each time it should get results from the database based on the selected value in the filter. For suppose if they select date in the filter it should pass the date to Stored Procedure and it should get the new dataset.

Please update this thread if anybody have the answer (or) Is there any other way to achieve this? please suggest.

4 Answers, 1 is accepted

Sort by
0
Iana Tsolova
Telerik team
answered on 20 Sep 2011, 08:56 AM
Hello Rajasekhar,

If you are binding your grid through the NeedDataSource event, there you can get the grid filter expression and use it to build your query so only desired data is returned from the server.

Regards,
Iana Tsolova
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now
0
Rajasekhar
Top achievements
Rank 1
answered on 21 Sep 2011, 10:06 AM
Hi Iana Tsolova,

 Thanks for the update. What you suggested seems to be working fine. but here GridColumn.CurrentFilterFunction always returns previous postback value if i try to get this value inside the NeedDataSource event.

Regards,
Rajasekhar
0
Iana Tsolova
Telerik team
answered on 21 Sep 2011, 03:34 PM
Hello Rajasekhar,

This is working properly on my side. Can you test the attached sample and let me know how it goes on your end and what differs in your case?

All the best,
Iana Tsolova
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now
0
Rajasekhar
Top achievements
Rank 1
answered on 27 Sep 2011, 12:59 PM
Hello Iana Tsolova,

    Thank you very much. provided code snippet is working fine.

Regards,
Rajasekhar.
Tags
Filter
Asked by
Rajasekhar
Top achievements
Rank 1
Answers by
Iana Tsolova
Telerik team
Rajasekhar
Top achievements
Rank 1
Share this question
or