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

Disable Automatic Bind of RadGrid on Cancel Command

3 Answers 138 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Mohamed
Top achievements
Rank 1
Mohamed asked on 23 Nov 2014, 10:15 AM
I've a radgrid with popup for insert/edit the data , and i'm using Advanced binding using the Need data source Event
I noticed that the cancel command call the need data source implicitly 
i need to override this behavior to disable the auto rebind of RadGrid

3 Answers, 1 is accepted

Sort by
0
Jayesh Goyani
Top achievements
Rank 2
answered on 24 Nov 2014, 04:16 PM
Hi,

Please try with the below code snippet.

protected void RadGrid1_ItemCommand(object sender, GridCommandEventArgs e)
{
    if (e.CommandName == RadGrid.CancelCommandName)
    {
        e.Canceled = true;
    }
}

Commands that invoke Rebind() implicitly

Let me know if any concern.

Thanks,
Jayesh Goyani
0
Mohamed
Top achievements
Rank 1
answered on 25 Nov 2014, 08:36 AM
it worked for me , executing cancel command didn't execute the Need data source event , but the edit form popup still opened , any recommendations ? 
0
Jayesh Goyani
Top achievements
Rank 2
answered on 25 Nov 2014, 05:04 PM
Hi,

Could you please provide more detail of your requirement?

Thanks,
Jayesh Goyani
Tags
Grid
Asked by
Mohamed
Top achievements
Rank 1
Answers by
Jayesh Goyani
Top achievements
Rank 2
Mohamed
Top achievements
Rank 1
Share this question
or