UltraWebGrid bug: Row is selected on mouse move

Submitted for your approval an UltraWebGrid with CellClickActionDefault=”RowSelect” and SelectTypeRowDefault=”Single” – an ordinary down-to-earth grid. It also posses event handler AfterSelectChangeHandler, also nothing out of the ordinary. But in a minute the aforementioned grid will exhibit properties most unusual. As the alert message ahead reads: Infragistics Bug.

Sorry, got carried away there for a while. But you must agree, a lot of bugs in code makes you think that you are in the Twilight Zone indeed. Anyway. You happily click the grid’s rows, selection changes, AfterSelectChangeHandler is getting executed, life goes on. Until your JavaScript code inside of AfterSelectChangeHandler displays an alert message to the user. After that a new UltraWebGrid feature is born: Row selection change on mouse move – a simple mouse wave over a row selects that row. It’s magic! Not the good kind though.

Traveling through another dimension looking at Infragistics JS library that handles mouse events I found that in igtbl_cellMouseMove function selection occurs if grid’s attribute mouseDown is set to 1. Wild guess – it is used for drag-selection, but this ain’t the case and the attribute shouldn’t be set. So the solution: unset it. At the end of your AfterSelectChangeHandler handler insert:

igtbl_getGridById(gridName).Element.setAttribute('mouseDown', 0);

and enjoy the happy end.

This issue was found in Infragistics NetAdvantage for ASP.NET 2011.1.2097, it probably exists in other versions.

Leave a Reply

Your email address will not be published. Required fields are marked *