RadGrid1 Refresh (event?)

Thread is closed for posting
4 posts, 1 answers
  1. rema43001
    rema43001 avatar
    14 posts
    Member since:
    Sep 2009

    Posted 16 Oct 2009 Link to this post

    Hello, Exist an event in the Refresh button of the RadGrid?

    I need execute transactions when the user click on the Refresh button.

    Can you help me?

    Thanks.
  2. Answer
    Nikolay Rusev
    Admin
    Nikolay Rusev avatar
    2284 posts

    Posted 19 Oct 2009 Link to this post

    Hello Richard,

    Clicking Refresh button in CommandItemTemplate of RadGrid will trigger GridRebind command which will force re-bind of RadGrid.
    You can intercept the command on ItemCommand event as follow:

    protected void RadGrid1_ItemCommand(object source, GridCommandEventArgs e)
    {
        if (e.CommandName == RadGrid.RebindGridCommandName)
        
            //your code goes here
        }
    }

    Best wishes,
    Nikolay
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Dasun
    Dasun avatar
    2 posts
    Member since:
    Aug 2010

    Posted 11 Aug 2010 Link to this post

    Hello,

    When I try the above code, I'm getting the following error when trying to run it. Any idea whats wrong I'm doing here?

    'WebApplication.RadGrid' does not contain a definition for 'RebindGridCommandName'

    Here is my code,

    protected void RadGrid1_OnItemCommand(object sender, GridCommandEventArgs e)
    {
        if (e.CommandName == RadGrid.RebindGridCommandName)
        {
            // something
        }
    }
  5. Nikolay Rusev
    Admin
    Nikolay Rusev avatar
    2284 posts

    Posted 17 Aug 2010 Link to this post

    Hello Dasun,

    'RebindGridCommandName' is static member of RadGrid as  shown on the code snippet bellow.

    Best wishes,
    Nikolay
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Back to Top