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

RadGrid1 Refresh (event?)

3 Answers 73 Views
UI for ASP.NET AJAX in ASP.NET MVC
This is a migrated thread and some comments may be shown as answers.
rema43001
Top achievements
Rank 1
rema43001 asked on 16 Oct 2009, 10:53 PM
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.

3 Answers, 1 is accepted

Sort by
0
Accepted
Nikolay Rusev
Telerik team
answered on 19 Oct 2009, 06:43 AM
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.
0
Dasun
Top achievements
Rank 1
answered on 12 Aug 2010, 02:08 AM
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
    }
}
0
Nikolay Rusev
Telerik team
answered on 17 Aug 2010, 12:37 PM
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
Tags
UI for ASP.NET AJAX in ASP.NET MVC
Asked by
rema43001
Top achievements
Rank 1
Answers by
Nikolay Rusev
Telerik team
Dasun
Top achievements
Rank 1
Share this question
or