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

Disable or enable grid row double click property

3 Answers 412 Views
Grid
This is a migrated thread and some comments may be shown as answers.
phyu
Top achievements
Rank 1
phyu asked on 22 Aug 2011, 01:53 AM
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

3 Answers, 1 is accepted

Sort by
0
Shinu
Top achievements
Rank 2
answered on 18 Jul 2012, 06:57 AM
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.
0
Kamal
Top achievements
Rank 1
answered on 06 Dec 2014, 07:46 AM
Hi

Is it possible to disable OnRowDblClick on some specific rows. Please advise.
Thanks
Kamal
0
Eyup
Telerik team
answered on 11 Dec 2014, 09:21 AM
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.

 
Tags
Grid
Asked by
phyu
Top achievements
Rank 1
Answers by
Shinu
Top achievements
Rank 2
Kamal
Top achievements
Rank 1
Eyup
Telerik team
Share this question
or