I have the following code
Javascript
function RowDblClick(sender, eventArgs)
{
window.radopen("Example.aspx?Id=" + eventArgs.getDataKeyValue("Id"), "Dialog");
}
Aspx Grid Code
<telerik:RadGrid ID="RadGrid" runat="server" AllowPaging="True" AllowSorting="True"
GridLines="None" ShowGroupPanel="True" Skin="Black" AutoGenerateColumns="False"
Width="100%" AllowAutomaticInserts="false" AllowAutomaticUpdates="false" PagerStyle-Mode="NumericPages"
OnItemInserted="GridItemInserted"
onitemdatabound="GridItemDataBound">
.............................................
........................................
..................................................
<ClientSettings>
<Selecting AllowRowSelect="true" />
<ClientEvents OnRowDblClick="RowDblClick" />
</ClientSettings>
</telerik:RadGrid>
<asp:Button ID="AddButton" runat="server" Text="Add New" OnClientClick="return ShowForm();" />
My actual question is to disable or enable RowDblClick property based on the user permission
This is my sample code in the aspx.cs file where i want to set the edit or view permission for radgrid
this.AddButton.Enabled =true/false;//the value will be true or false
this.RadGrid.Enabled=true/false;
//the value will be true or false ,based on this value i want to enable/disable my rowdblclick,can any one help out to figure out where i am doing wrong
Javascript
function RowDblClick(sender, eventArgs)
{
window.radopen("Example.aspx?Id=" + eventArgs.getDataKeyValue("Id"), "Dialog");
}
Aspx Grid Code
<telerik:RadGrid ID="RadGrid" runat="server" AllowPaging="True" AllowSorting="True"
GridLines="None" ShowGroupPanel="True" Skin="Black" AutoGenerateColumns="False"
Width="100%" AllowAutomaticInserts="false" AllowAutomaticUpdates="false" PagerStyle-Mode="NumericPages"
OnItemInserted="GridItemInserted"
onitemdatabound="GridItemDataBound">
.............................................
........................................
..................................................
<ClientSettings>
<Selecting AllowRowSelect="true" />
<ClientEvents OnRowDblClick="RowDblClick" />
</ClientSettings>
</telerik:RadGrid>
<asp:Button ID="AddButton" runat="server" Text="Add New" OnClientClick="return ShowForm();" />
My actual question is to disable or enable RowDblClick property based on the user permission
This is my sample code in the aspx.cs file where i want to set the edit or view permission for radgrid
this.AddButton.Enabled =true/false;//the value will be true or false
this.RadGrid.Enabled=true/false;
//the value will be true or false ,based on this value i want to enable/disable my rowdblclick,can any one help out to figure out where i am doing wrong