This is a migrated thread and some comments may be shown as answers.

GridClientSelectColumn and KeyboardNavigation bug / performance issue

4 Answers 50 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Constantin
Top achievements
Rank 1
Constantin asked on 22 May 2013, 10:39 AM
Hi,

when a Grid is configured with the AllowKeyboardNavigationSettings="true", AllowMultiRowSelection="true" and AllowScroll="true" the Select All button of the GridClientSelectColumn behaves oddly in Internet Explorer. It seems that each row is checked/unchecked individually and the grid is scrolled to show the row that is being checked.

I made a screencast of the odd behavior: http://screencast.com/t/GkyzR8ACa

To reproduce configure a Grid with the above mentioned settings, klick inside the grid and use the arrow keys to navigate between rows, then click on the Select All Button in the Grid Header.

The problem probably exists in other browsers as well. In Chrome the grid ends up being scrolled all the way to the bottom after Selecting/Deselecting All, but the effect is less visible probably because Chrome's Javascript performance is better.


4 Answers, 1 is accepted

Sort by
0
Eyup
Telerik team
answered on 27 May 2013, 01:04 PM
Hello Constantin,

When the grid has an active row, it modifies its index in accordance with the row selection. And since the active row affects the scrolling, the user observes this unwanted behavior.

You can use the following approach to overcome the problem:
<ClientEvents OnGridCreated="gridCreated" />
JavaScript:
function gridCreated(sender, args) {
    var header = sender.get_masterTableView().HeaderRow;
    var selectAllCheckBox = $(header).find("[type=checkbox]")[0];
 
    selectAllCheckBox.onmousedown = function () {
        sender.clearActiveRow();
    }
}

Hope this helps. Please give it a try and let me know if it works for you.

Regards,
Eyup
Telerik
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
0
Constantin
Top achievements
Rank 1
answered on 03 Jun 2013, 08:49 AM
We implemented a similar workaround, but I cannot believe that this is intended behavior and was hoping that you would fix this in a future release, so that we have one less work around for quirks in our application.

Changing the active row is meaningless to the user when clicking on the SelectAll checkbox. The active row should be cleared or it should be preserved, i. e. the row that was active before clicking on SelectAll should be active afterwards. At the very least the poor performance for scrolling in IE should be prevented by setting the active row only once after the selection has been set.

Also, from looking at your javascript framework you have already supressed the scrolling behavior in certain cases, e. g. when clicking on one row and shift-clicking on another to select multiple rows.
0
Eyup
Telerik team
answered on 06 Jun 2013, 08:19 AM
Hello Constantin,

I will forward this matter to our developers to fix it for the future releases. I have updated your Telerik points for bringing the problem to our attention. Sorry for any inconvenience caused.

Regards,
Eyup
Telerik
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to the blog feed now.
0
Constantin
Top achievements
Rank 1
answered on 06 Jun 2013, 08:50 AM
Thanks!
Tags
Grid
Asked by
Constantin
Top achievements
Rank 1
Answers by
Eyup
Telerik team
Constantin
Top achievements
Rank 1
Share this question
or