Disable or enable grid row double click property

4 posts, 0 answers
  1. phyu
    phyu avatar
    6 posts
    Member since:
    May 2009

    Posted 21 Aug 2011 Link to this post

    Dear Telerik Team,

    I would like to disable or enable OnRowDblClick event of Grid accordingly user permissions.

    When I tried the following code,the whole page data disappears.

    < if (Condition is true)
                        RadGrid1.ClientSettings.ClientEvents.OnRowDblClick = "true";

    else
    RadGrid1.ClientSettings.ClientEvents.OnRowDblClick = "false";

    >


    Thanks in advance
  2. Shinu
    Shinu avatar
    17764 posts
    Member since:
    Mar 2007

    Posted 18 Jul 2012 Link to this post

    Hi,

    The OnRowDblClick event of the RadGrid cannot be enabled or disabled.Its not possible to simply give true or false because the OnRowDblClick is a function.Please take a look into the following code snippet I tried to make the RadGrid in edit mode on OnRowDblClick event, checking for some condition.

    C#:
    If(condition)
    {
        RadGrid1.ClientSettings.ClientEvents.OnRowDblClick = "RowDblClick";
    }
    else
    {
        RadGrid1.ClientSettings.ClientEvents.OnRowDblClick = "RowDblClickCancel";
    }

    Javascript:
    function RowDblClick(sender, eventArgs)
    {
        //your code
    }
    function RowDblClickCancel(sender, eventArgs)
    {
        return false;
    }

    Its not possible to cancel the OnRowDblClick event.Please take a look into this help documentation.

    Thanks,
    Shinu.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Kamal
    Kamal avatar
    34 posts
    Member since:
    Jan 2013

    Posted 06 Dec 2014 Link to this post

    Hi

    Is it possible to disable OnRowDblClick on some specific rows. Please advise.
    Thanks
    Kamal
  5. Eyup
    Admin
    Eyup avatar
    3005 posts

    Posted 11 Dec 2014 Link to this post

    Hello Kamal,

    Can you please elaborate on your requirement? What exactly you want to achieve? Are you actually using the OnRowDblClick client-side event handler of the grid? What is your specific configuration?

    Regards,
    Eyup
    Telerik
     

    Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

     
Back to Top