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

Cell Selection & Row Selection

8 Answers 198 Views
GridView
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Morgan McCollough
Top achievements
Rank 1
Morgan McCollough asked on 07 Oct 2010, 07:00 PM
I was wondering if it was a supported scenario to have both row selection and cell selection. Basically, we would like to have cell selection working in one of our grids, but we would also like to use the normal select column on the far left to let users select entire rows.

The selection column seems to work fine for individual columns, but the checkbox in the header doesn't seem to select all rows. It highlights the entire grid, but it doesn't seem to actually select rows. I tried adding my own custom header to the GridViewSelectColumn with a checkbox that has the following click handler. This seems to work, but it is a little slow due to the UI delay in handling all the CollectionChanged events. Is there a better way to do this?

private void columnSelectItem_SelectAll(object sender, EventArgs e)
        {
            CheckBox chk =  sender as CheckBox;
            bool selected = chk.IsChecked.Value;
            ReferenceGrid.UnselectAll();
            if (!selected)
                return;
            foreach (var item in ReferenceGrid.Items)
            {
                ReferenceGrid.SelectedItems.Add(item);
            }
        }

8 Answers, 1 is accepted

Sort by
0
Riia
Top achievements
Rank 1
answered on 11 Oct 2010, 09:15 AM
Hi,

We would also like to allow users to select both rows and cells to achieve Excel-like functionality. However, currently SelectionUnit has two possible values - Cell or FullRow. Could you please tell if there are any plans for supporting both at the same time?

Best regards,
Riia
0
Maya
Telerik team
answered on 11 Oct 2010, 09:54 AM
Hi Riia,

We do consider the best possible approach for enabling both cell- and row-level selection simultaneously. However, we cannot still define a particular time frame for its implementation. For the time being you may take a look at this forum thread that provides explanations as well as a sample project demonstrating a possible way of achieving this functionality.
Furthermore, we are improving the way our GridViewSelectColumn is working when the SelectionUnit Property is set to "Cell". For the time being you may handle that case with custom CheckBox column or defining the Header of the column separately with a CheckBox element inside.
 

Kind regards,
Maya
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
Riia
Top achievements
Rank 1
answered on 12 Oct 2010, 08:28 AM
Hi Maya,

Thank you for the quick reply.

The forum thread link you provided seems promising. However the example is for WPF, could you tell how to implement that in Silverlight project?

Best regards,
Riia
0
Maya
Telerik team
answered on 15 Oct 2010, 10:12 AM
Hello Riia,

Unfortunately, some of the events that are available in WPF Platform (PreviewMouseLeftButtonDown in this case) are not in Silverlight. Thus the required functionality may not be achievable.
However, we do have plans for introducing it as a feature in the RadGridView. Still we cannot commit to any time-frame for its implementation.

Greetings,
Maya
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
Morgan McCollough
Top achievements
Rank 1
answered on 30 Mar 2011, 04:08 PM
I don't suppose this made it in to Q1 2011?
0
Milan
Telerik team
answered on 30 Mar 2011, 04:41 PM
Hi Morgan McCollough,

Unfortunately you are correct - this feature is not available in Q1 2010. I am afraid that it did not make into our to-do list for Q2 either. Nevertheless if other tasks are completed ahead of schedule we might be able to include the mentioned feature but at this time this seems unlikely. 


Best wishes,
Milan
the Telerik team
0
Anne Lyon
Top achievements
Rank 1
answered on 16 May 2012, 09:04 AM
Hi,

I wondered if there is any news regarding this issue? I need to have selection unit=Cell to enable user to copy paste single cells in the grid. But still we would really like to be able to click on the row-selection column to the very left and highlight the selected row. Is there a built in way in RadGridView that supports this, and if not, what event is fired when the user clicks on a row selector, and how do I switch off the cells selected? (to get a more Excel-like approach to cell/row highlighting)

regards,
Anne
0
Maya
Telerik team
answered on 16 May 2012, 02:25 PM
Hi Anne,

The way to go for implementing such functionality is the approach illustrated in the above-mentioned forum thread. Let me know in case you need any assistance with it. 

All the best,
Maya
the Telerik team

Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

Tags
GridView
Asked by
Morgan McCollough
Top achievements
Rank 1
Answers by
Riia
Top achievements
Rank 1
Maya
Telerik team
Morgan McCollough
Top achievements
Rank 1
Milan
Telerik team
Anne Lyon
Top achievements
Rank 1
Share this question
or