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

[Solved] RowSelection - background color

4 Answers 166 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.
Sajjad Shah
Top achievements
Rank 1
Sajjad Shah asked on 10 Nov 2010, 04:13 PM
Hi.
I am using this version: 2010.1.603.1040 (RadGridView /Silverlight)
Following question

1.By clicking on GridView, I am displaying data in another chart. And that I am displaying using the double click on the row. is there a way to change the color of row when it is double clicked.

2.How can i get the row reference with the single click, that SelectionUnit thing does not work for me. I wanted to achieve outlined in #1 with a single click in case I could not change the background color of the row on a double click.

3. You can  suggest a way to differentiate (in terms of background color) between single click and double click on the row.

Any of the solutions will solve my problem but 2 and 3 would be preferable.

4 Answers, 1 is accepted

Sort by
0
Maya
Telerik team
answered on 10 Nov 2010, 04:51 PM
Hello Sajjad Shah,

I am sending you a sample project illustrating how to change the color of a double-clicked row. It follows the example demonstrated in our demos for double click events. Furthermore, you may get a reference for the selected item using the SelectedItem property of the grid.

Best wishes,
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
Sajjad Shah
Top achievements
Rank 1
answered on 10 Nov 2010, 05:37 PM
Thanks Maya,
This functionality is very difficult to understand (you double click and it changes the border only because the row selection color is overwriting the background color) then you select some other row and then it shows the double clicked row in its full Cyan color. We don't want this. It should change color on the double click to cyan (not just only border)
I know you will probably suggest change the selection color to white. No! We don't want this as we want single clicked row to have that orange/yellow color.

We want this:
1. double click = completely change to cyan (not only when we completely on some other row afterwards)
2. single click (same color as we have now -orange/yellow)
0
Maya
Telerik team
answered on 11 Nov 2010, 09:27 AM
Hi Sajjad Shah,

Please take another look at the OnCellDoubleClick method. I have left a single line commented - doubleClickedRow.IsSelected = false. My purpose was to leave you play along and decide which is the more appropriate way of coloring the double-clicked row. So, you may easily uncomment this line and see the result.
Let me know if it meets your requirements.
 

Best wishes,
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
Sajjad Shah
Top achievements
Rank 1
answered on 11 Nov 2010, 02:56 PM
Thanks.
Tags
GridView
Asked by
Sajjad Shah
Top achievements
Rank 1
Answers by
Maya
Telerik team
Sajjad Shah
Top achievements
Rank 1
Share this question
or