My radgrid doesnt work fine on a double click. My problem is on many occasions the event for a double click is not triggered. It will respond after i have tried many times.
My code for c# and code behind is shown below:
C#
protected void rdgContacts_PreRender(object sender, EventArgs e)
{foreach (GridDataItem item in rdgContacts.MasterTableView.Items){
if (item.Selected){strSelectedtxt = item["UserID"].Text; }}}
protected void rdgContacts_ItemCommand(object source, GridCommandEventArgs e){
if (e.Item is GridDataItem){GridDataItem dataItem = (GridDataItem)e.Item; dataItem.Attributes.Add("OnDblClick", "return ContactOpenWindow('" + strSelectedtxt + "');");}
}
HTML Code/Java script
My code for c# and code behind is shown below:
C#
protected void rdgContacts_PreRender(object sender, EventArgs e)
{foreach (GridDataItem item in rdgContacts.MasterTableView.Items){
if (item.Selected){strSelectedtxt = item["UserID"].Text; }}}
protected void rdgContacts_ItemCommand(object source, GridCommandEventArgs e){
if (e.Item is GridDataItem){GridDataItem dataItem = (GridDataItem)e.Item; dataItem.Attributes.Add("OnDblClick", "return ContactOpenWindow('" + strSelectedtxt + "');");}
}
HTML Code/Java script
function ContactOpenWindow(strSelectedtxt){
window.open("frmSiteContacts.aspx?ID=" + strSelectedtxt,"", "location=0,status=0,scrollbars=0,width=600,height=430");}