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
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
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.
Maya
the Telerik team
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
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.
Maya
the Telerik team
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
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
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.
Maya
the Telerik team
Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>