dbclick and tableDnd not working at same time

CandiiRainbow

New Member
I have following code - \[code\]<style type="text/css"> .HighLightOnDragandDrop { background-color: #CCFFCC; } .HideTemplateColumn { width: 0px; display: none; }</style><script type="text/javascript"> var strorder;function OnDropItem(table, row) { $('#AjaxResult').load("server/ajaxTest.php?" + $.tableDnD.serialize()); reorder(); OnMouseOutClass(); $.ajax({ type: "POST", url: "/View/MDBC.aspx/MDBCSequenceNoReorder", data: '{"Reorder":"' + strorder + '"}', contentType: "application/json; charset=utf-8", dataType: "json", async: false, cache: false, error: function (xhr, status, error) { alert(xhr.responseText); } }); } function reorder() { strorder = ""; var totalid = $('#<%=grvMDBC.ClientID%> tr td input').length; for (var i = 0; i < totalid; i++) { strorder = strorder + $("#<%=grvMDBC.ClientID%> tr td").innerText + "|" + $('#<%=grvMDBC.ClientID%> tr td input').getAttribute("value") + "|" + "*"; } } function OnMouseOutClass() { var gridID = "#<%=grvMDBC.ClientID%>"; var selected = null; $(gridID).find("tr").mouseleave( function () { $(selected).removeClass("HighLightOnDragandDrop"); }).mouseenter( function () { $(selected).removeClass("HighLightOnDragandDrop"); }).mouseover( function () { $(selected).removeClass("HighLightOnDragandDrop"); }); }</script>\[/code\]in c# i have following code - \[code\]protected void grvMDBC_RowDataBound(object sender, GridViewRowEventArgs e) { try { if (e.Row.RowType == DataControlRowType.DataRow) { e.Row.Cells[0].HorizontalAlign = HorizontalAlign.Left; e.Row.Cells[0].Attributes.Add("OnMouseOver", "this.style.cursor = 'hand';"); e.Row.Cells[0].Attributes.Add("onDblClick", Page.ClientScript.GetPostBackClientHyperlink(grvMDBC, "Select$" + e.Row.RowIndex.ToString())); int rowIndex; clsMClist = new List<MDBC>(); clsMClist = (List<MDBC>)Session["clsMClist"]; if (clsMClist == null) throw new Exception("No Results found."); rowIndex = e.Row.RowIndex; for (int lstCnt = 0; lstCnt < clsMClist.Count; lstCnt++) { if (clsMClist[lstCnt].IsActive == 0) { if (lstCnt == rowIndex) { e.Row.BackColor = System.Drawing.ColorTranslator.FromHtml("#FFCCCC"); } } } Session["clsMClist"] = clsMClist; } } catch (Exception ex) { DisplayErrorMessage(true, ex.Message.ToString()); } }\[/code\]Here both tableDnD and double click are not working simultaneously. dbclick shows first dnd results then grid loads again with previous order.I want both the event to work. Any help?
 
Back
Top