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

Color border around selection of multiple rows in telerik radgridview

1 Answer 119 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Dilip
Top achievements
Rank 1
Dilip asked on 23 Jun 2015, 11:07 AM

Hi,

I am new to the Silverlight, can anyone please guide me how to draw outer border color on selection of multiple rows in radgridview(Similar to excel, if we select 2 or 3 rows only outer border will get highlight). I have done for individual rows using below code.

foreach (var itm in this.grd.SelectedItems)
{
itemsasf.Add(itm as Collection);

GridViewRow row = this.grd.ItemContainerGenerator.ContainerFromItem(itm) as GridViewRow;
if (row != null)
{
//row.VerticalGridLinesBrush = new SolidColorBrush(Colors.Black);
row.BorderBrush = new SolidColorBrush(Colors.Black);
row.BorderThickness = new Thickness(1.0);
}

 

Thanks,

Dilip L

            }

1 Answer, 1 is accepted

Sort by
0
Dimitrina
Telerik team
answered on 26 Jun 2015, 10:28 AM
Hello Dilip,

You can check the template structure of GridViewRow. The way to style block of rows would be applying a RowStyleSelector. On the other hand, you can specify styling for the particular selected row. You can also refer to the documentation on Styling Rows.

Regards,
Dimitrina
Telerik
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 Feedback Portal and vote to affect the priority of the items
Tags
General Discussions
Asked by
Dilip
Top achievements
Rank 1
Answers by
Dimitrina
Telerik team
Share this question
or