Disable Automatic Bind of RadGrid on Cancel Command

4 posts, 0 answers
  1. Mohamed
    Mohamed avatar
    2 posts
    Member since:
    May 2012

    Posted 23 Nov 2014 Link to this post

    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
  2. Jayesh Goyani
    Jayesh Goyani avatar
    2732 posts
    Member since:
    May 2010

    Posted 24 Nov 2014 in reply to Mohamed Link to this post

    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
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Mohamed
    Mohamed avatar
    2 posts
    Member since:
    May 2012

    Posted 25 Nov 2014 in reply to Jayesh Goyani Link to this post

    it worked for me , executing cancel command didn't execute the Need data source event , but the edit form popup still opened , any recommendations ? 
  5. Jayesh Goyani
    Jayesh Goyani avatar
    2732 posts
    Member since:
    May 2010

    Posted 25 Nov 2014 in reply to Mohamed Link to this post

    Hi,

    Could you please provide more detail of your requirement?

    Thanks,
    Jayesh Goyani
Back to Top