I found some great mouse up and down code on this site to prevent the problem of a link opening a link, but the window with the link not getting focus. Unfortunately, it seems to have disabled the ability to sort. I've tried everything I can think of, but it's still not sorting. Does anyone have any ideas? The code I added is below. ugDocuments is the grid.
function ugDocuments_MouseUpHandler(gridName, id, button){ // For the download and view columns, cancel the standard mouseup event // because if this is not done, focus will be returned to the grid through // a window.setTimeout event
if (oCell != null) { switch (oCell.Column.Key.toLowerCase()) { case "document": case "new": case "urgent": case " ": return true; break; } }}
var m_fFirstTime = 1;function ugDocuments_MouseDownHandler(gridName, id, button){ // The first time this event is fired for the download or view column, // the _mouseDown property on the grid needs to be cleared because the mouseup // event is not fired for some strange reason. This will ensure the popup window // that is opened for the hyperlink is not opened behind the other windows. if (m_fFirstTime == 1) { var oCell = igtbl_getCellById(id);
if (oCell != null) { switch (oCell.Column.Key.toLowerCase()) { case "document": case "new": case "urgent": case " ": m_fFirstTime = 0; oCell.Band.Grid._mouseDown = 0; break; } } }