First off I am using NetAdvantage for .NET 2009.1 in a MOSS 2007 environment. All the code I have written works perfectly in Internet Explorer for the user to edit an Ultrawebgrid cell on a double click. When i try edit the cell in firefox, it never allows the user to edit the cell. It just selects the cell the user clicks on.
I have tried adding a double click handler with the following javascript code to correct the situation;
function DblClickHandler(gridName, cellId) { var cell=igtbl_getCellById(cellId); cell.activate(); cell.beginEdit(); }
and I set it to function;
Grid1.DisplayLayout.ClientSideEvents.DblClickHandler = "DblClickHandler"
I have search the web and the forums to see if I am missing something and have found very little information. Can anyone point me to what I am missing?
- Adam
I have made a small fix in ig_WebGrid.js file.
old code:
function igtbl_getAbsBounds(elem, g, forAbsPos){ . . . else if (ig_csom.IsFireFox && document.getBoxObjectFor(elem)) { var rect = document.getBoxObjectFor(elem); r.x = rect.x; r.y = rect.y; r.w = rect.width; r.h = rect.height; } . . .
new code
function igtbl_getAbsBounds(elem, g, forAbsPos){ . . . else if (ig_csom.IsFireFox) {
if (typeof document.getBoxObjectFor == 'function') { var rect = document.getBoxObjectFor(elem); r.x = rect.x; r.y = rect.y; r.w = rect.width; r.h = rect.height; } else { var ScrollTop = document.body.scrollTop; if (ScrollTop == 0) { if (window.pageYOffset) ScrollTop = window.pageYOffset; else ScrollTop = (document.body.parentElement) ? document.body.parentElement.scrollTop : 0; }
var ScrollLeft = document.body.scrollLeft; if (ScrollLeft == 0) { if (window.pageXOffset) ScrollLeft = window.pageXOffset; else ScrollLeft = (document.body.parentElement) ? document.body.parentElement.scrollLeft : 0; } var rect = elem.getBoundingClientRect(); r.x = rect.left + ScrollLeft; r.y = rect.top + ScrollTop; r.w = rect.right - rect.left; r.h = rect.bottom - rect.top; }
}. . .
I have the same problem with FireFox. The grid will not go into edit mode, but will for IE.
I have made the suggested code changes in all of the ig_WebGrid.js files I find on my system in folders c:\inetpub\wwwroot\aspnet_client\infragistics\20091CLR35\Scripts and c:\inetpub\wwwroot\aspnet_client\infragistics\20091CLR20\Scripts.
But when I run my application and check in debug, the js code is not running the edited code.
How do I get the proper/edited script code to run?