Hi
I have created a RadGrid and a RadButton.
For the RadGrid, I have attached a javascript:
var script = @"
function RowDblClick(sender, eventArgs) {
$find(""" + btnEdit..ClientID + @""").click();
}";
var javaScript = new HtmlGenericControl("script");
javaScript.Attributes["type"] = "text/javascript";
javaScript.InnerHtml = script;
Controls.Add(javaScript);
this.DataGrid.ClientSettings.ClientEvents.OnRowDblClick = "RowDblClick";
For the btnEdit (this is my RadButton), I have attached a EventHandler on the Serverside, which should deactivate the RadGrid:
this.btnEdit.AutoPostBack = true;
this.btnEdit.Click += BtnEditOnClick;
private void BtnEditOnClick(object sender, EventArgs eventArgs) {
this.DataGrid.Enabled = false;
this.DataGrid.ClientSettings.EnablePostBackOnRowClick = false;
this.DataGrid.ClientSettings.Resizing.AllowColumnResize = false;
this.DataGrid.ClientSettings.Selecting.AllowRowSelect = false;
this.DataGrid.ClientSettings.AllowKeyboardNavigation = false;
}
But it doesn't work. When I click on the Button, it work great - but not when I doubleclick the row. But the javascript RowDblClick will be executed - I have checked this with an alert().
I have created a RadGrid and a RadButton.
For the RadGrid, I have attached a javascript:
var script = @"
function RowDblClick(sender, eventArgs) {
$find(""" + btnEdit..ClientID + @""").click();
}";
var javaScript = new HtmlGenericControl("script");
javaScript.Attributes["type"] = "text/javascript";
javaScript.InnerHtml = script;
Controls.Add(javaScript);
this.DataGrid.ClientSettings.ClientEvents.OnRowDblClick = "RowDblClick";
For the btnEdit (this is my RadButton), I have attached a EventHandler on the Serverside, which should deactivate the RadGrid:
this.btnEdit.AutoPostBack = true;
this.btnEdit.Click += BtnEditOnClick;
private void BtnEditOnClick(object sender, EventArgs eventArgs) {
this.DataGrid.Enabled = false;
this.DataGrid.ClientSettings.EnablePostBackOnRowClick = false;
this.DataGrid.ClientSettings.Resizing.AllowColumnResize = false;
this.DataGrid.ClientSettings.Selecting.AllowRowSelect = false;
this.DataGrid.ClientSettings.AllowKeyboardNavigation = false;
}
But it doesn't work. When I click on the Button, it work great - but not when I doubleclick the row. But the javascript RowDblClick will be executed - I have checked this with an alert().