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

Multiple selection causes "page" selection

4 Answers 49 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Charles
Top achievements
Rank 2
Charles asked on 28 Feb 2012, 03:57 PM
I'm in the process of creating a custom email client using the Telerik grid and treeview controls. I have modeled some of the UI on the Telerik WebMail sample, in that the grid of email headers allows single selection in order to display the message body below. However, I also need to support multiple selection of rows and to be able to drag and drop those selected rows. I am able to do this, but there is a disturbing side effect when multiple rows are selected (via ctrl-click or select-click - no drag to select, that is turned off). Whenever additional rows are selected, it looks as if the grid is selected in much the same way as an HTML table would be if the user had clicked and dragged on the rows. The functionality of dragging and dropping works, but the highlighting of other rows that were not meant to be selected is very distracting to the user. I don't notice this behavior on other Telerik samples that demonstrate multiple selection and/or drag-drop, so I'm at a loss as to what is causing the problem on my end. Perhaps the combination of single selection and multiple selection is causing the behavior.

In any case, I have included a screenshot of what the grid looks like after the multiple selections are made in order to illustrate the problem. The rows that have a green background are the ones that I've actually meant to select, yet all of the other rows are "selected" as well - as if the user had intentionally dragged to select them.

Here is code related to the way the grid is set up in the ASPX file.
<telerik:RadGrid runat="server" ID="rgrdEmails" Height="100%" BorderWidth="0"
    AutoGenerateColumns="false" GridLines="Both" ShowGroupPanel="true"
    OnNeedDataSource="rgrdEmails_NeedDataSource" AllowMultiRowSelection="True"
    OnRowDrop="rgrdEmails_RowDrop" OnSelectedIndexChanged="rgrdEmails_SelectedIndexChanged">
    <ClientSettings AllowDragToGroup="True" EnableRowHoverStyle="true" AllowRowsDragDrop="True" EnablePostBackOnRowClick="true">
        <Selecting AllowRowSelect="true" EnableDragToSelectRows="False" />
        <Scrolling AllowScroll="True" UseStaticHeaders="True" />
        <ClientEvents OnRowDblClick="grdDblClick" OnRowDropping="onRowDropping" />
    </ClientSettings>
    <MasterTableView TableLayout="Fixed" Width="100%" GroupLoadMode="Client"
        DataKeyNames="EmailId" ClientDataKeyNames="EmailId,Subject" AdditionalDataFieldNames="Date">
        <GroupByExpressions>
            <telerik:GridGroupByExpression>
                <GroupByFields>
                    <telerik:GridGroupByField FieldName="DateResult" HeaderValueSeparator=":" SortOrder="Descending" />
                </GroupByFields>
                <SelectFields>
                    <telerik:GridGroupByField FieldName="DateResult" HeaderText="Date" FormatString="{0:d}" />
                </SelectFields>
            </telerik:GridGroupByExpression>
        </GroupByExpressions>
        <Columns>
            <telerik:GridDragDropColumn runat="server" HeaderStyle-Width="18px"/>
            <telerik:GridBoundColumn DataField="From" HeaderText="From" HeaderStyle-Width="120px"></telerik:GridBoundColumn>
            <telerik:GridBoundColumn DataField="Subject" HeaderText="Subject"></telerik:GridBoundColumn>
            <telerik:GridBoundColumn DataField="Received" HeaderText="Date" HeaderStyle-Width="150px"
                GroupByExpression="DateResult Date GROUP BY DateResult">
            </telerik:GridBoundColumn>
            <telerik:GridBoundColumn DataField="EmailId" Visible="false"></telerik:GridBoundColumn>
            <telerik:GridCalculatedColumn UniqueName="Date" DataType="System.DateTime" DataFields="Received"
                Expression="Received.ToShortDateString()" HeaderText="Date" Visible="false">
            </telerik:GridCalculatedColumn>
        </Columns>
    </MasterTableView>
</telerik:RadGrid>

Notice that I also allow double clicking a row to bring up a pop-up window. Finally, the grid is inside of a RadPane which is inside of a RadSplitter. Hopefully, that doesn't make any difference in this case.

Does anyone know a way around this issue? Any help will be appreciated.

4 Answers, 1 is accepted

Sort by
0
Charles
Top achievements
Rank 2
answered on 29 Feb 2012, 05:19 PM
Replying to my own post with an update...

Seems that the problem I encountered had to do with the fact that I was using IE8. The latest version of Chrome did not have this problem, and IE9 also does not have this issue.

So, I upgraded to IE9 and, fortunately, we are going to be able to upgrade all of our users as well. However, this is an internal LOB application and, if we had been stuck on IE8 for whatever reason, it would have been a serious concern.

Is there a workaround for this issue, just in case we have the IE9 rug pulled from under us?
0
Tsvetina
Telerik team
answered on 02 Mar 2012, 10:46 AM
Hi Charles,

The described issue is not a known problem with our controls, so in order to know the cause, we will need to investigate the scenario. Would it be possible to send us code that we could run or to open a support ticket and attach a project replicating the issue? If it is a problem on our side we will address it as needed and let you know if a work around is required/available.

Regards,
Tsvetina
the Telerik team
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
Shark75
Top achievements
Rank 2
answered on 05 Sep 2014, 01:06 PM
This is still a problem with Firefox (even the latest one). IE11 and Chrome are fine, just Firefox this problem occurs with.
0
Shark75
Top achievements
Rank 2
answered on 05 Sep 2014, 01:47 PM
Discovered this post which provides a workaround for Firefox...
http://www.telerik.com/forums/cell-selection-in-firefox#w6tSqxGpMkSRFuwewoQtvA
Tags
Grid
Asked by
Charles
Top achievements
Rank 2
Answers by
Charles
Top achievements
Rank 2
Tsvetina
Telerik team
Shark75
Top achievements
Rank 2
Share this question
or