radgrid filtering

5 posts, 0 answers
  1. JJ
    JJ avatar
    147 posts
    Member since:
    May 2010

    Posted 24 Jun 2011 Link to this post

     Problem: after put rgDataRetrieval.MasterTableView.FilterExpression=... on grid PreRender makes grid all the column filter function not work. Please help!

     

    I have a radgrid, has allow filter for all the columns turn to true.
    I also need to have a date manually filtered by a search button click to filter the datagrid manually by start and end date.

    I put the following code on PreRender, the serach button manually filter works fine, but after put  rgDataRetrieval.MasterTableView.FilterExpression=... in PreRender, the grid column auto filter for all the columns does not work right- not work at all

    protected
    void rgDataRetrieval_PreRender(object sender, EventArgs e)

     

    {

     

     

    DateTime startDate =Convert.ToDateTime("1/1/1900");

     

     

     

    DateTime endDate = Convert.ToDateTime("1/1/2900");

     

     

     

    if (rdpFrom.SelectedDate!=null)

     

    startDate=rdpFrom.SelectedDate.Value;

     

     

    if (rdpTo.SelectedDate!=null)

     

    endDate=rdpTo.SelectedDate.Value.AddDays(1);

     

     

    if (rdpFrom.SelectedDate != null || rdpTo.SelectedDate != null)

     

    {

    rgDataRetrieval.MasterTableView.FilterExpression =

     

    null;

     

    rgDataRetrieval.MasterTableView.FilterExpression =

     

    "(([DownloadEnd] >= '" + startDate +

     

     

     

    "') AND ([DownloadEnd] <= '" + endDate + "')) ";

     

    rgDataRetrieval.MasterTableView.Rebind();

    }

    }


  2. Mira
    Admin
    Mira avatar
    1124 posts

    Posted 27 Jun 2011 Link to this post

    Hello JJ,

    I have followed your scenario and prepared a sample project for you demonstrating how the desired functionality can be implemented. You can find it attached to this message.

    I hope it helps.

    Best wishes,
    Mira
    the Telerik team

    Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.

  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. JJ
    JJ avatar
    147 posts
    Member since:
    May 2010

    Posted 28 Jun 2011 Link to this post

    Thanks Mira. I see I have have missed.
  5. Balasubramanian
    Balasubramanian avatar
    4 posts
    Member since:
    May 2011

    Posted 11 Jul 2011 Link to this post

    Hi,

    Do you guys have a documentation which defines all the filter options available in rad grid, with details on how they function with different columns with different data type?
    If you have one can you please share that with me. We use RadGrid in our application and are documenting the application user guide.
    Any documentation on the rad grid filtering would be of great help.

    Thank you.

    Regards
    Balasubramanian Ramachandran.
  6. Shinu
    Shinu avatar
    17764 posts
    Member since:
    Mar 2007

    Posted 11 Jul 2011 Link to this post

    Hello Balasubramanian,

    Take a look at the following help article and demo which explains more on filtering.

    Basic filtering(Documentation) .
    Basic Filtering (Demo).

    Thanks,
    Shinu.
Back to Top
UI for ASP.NET Ajax is Ready for VS 2017