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

Highlight selected row

3 Answers 95 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Andreas
Top achievements
Rank 1
Andreas asked on 23 May 2011, 01:27 PM
Hi,

I do disable a gridview after a double click on a row.
I would like to indicate somehow which line was selected, but the Row Indicator is invisible on a disabled gridview.
Is there any way to keep the Row Indicator visible in a disabled gridview or highlight the selected row so the user knows which row was double clicked?

Regards,

Andreas

3 Answers, 1 is accepted

Sort by
0
Vanya Pavlova
Telerik team
answered on 24 May 2011, 11:08 AM
Hi Andreas,

 

I am not quite sure that I understand your requirement correctly. May you please elaborate a little bit more about your exact settings? Generally you can enable and respectively disable RadGridView, GridViewRow, GridViewCell. However you perform these operations on a UI level only in GridViewCell. Thinking in this way if you want to change the default color in disabled RadGridView you should edit the template of GridViewCell and change the Border named Background_Disabled in an appropriate for your manner. 
You may take a look at the following forum thread that demonstrates how to change the background of the double clicked row. 


Regards,
Vanya Pavlova
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
Andreas
Top achievements
Rank 1
answered on 10 Jun 2011, 11:49 AM
Hi Vanya,

this are the steps I want to execute:
1. double click at a row in my DataGrid
2. on double click change the color of this row
3. and on the same doble click disable the whole grid
Now the grid is grayed out and I don't know which row was double clicked.

I took a look at the example in the recommended thread and changed it in a way similar to my requirements but the problem is the same.
In the method OnCellDoubleClicked (where the color is being changed) I inserted playersGrid.IsEnabled = false.
Now the color changes but when the grid is disabled you don't see which color this is.

Is there perhaps another solution to indicate the double clicked row when the grid was disabled at the same time?

Regards,

Andreas
0
Vanya Pavlova
Telerik team
answered on 14 Jun 2011, 09:08 AM
Hello Andreas,

 
As i tried to proposed in my previos reply:

Generally you can enable and respectively disable RadGridView, GridViewRow, GridViewCell. However you perform these operations on a UI level only in GridViewCell. Thinking in this way if you want to change the default color in disabled RadGridView you should edit the template of GridViewCell and change the Border named Background_Disabled in an appropriate for you manner.


The brush that paints the disabled background of a cell is a solid one. By that reason you should change this color to a brush that allows transparency.


Please give it a try and if you need any further assistance feel free to open a new support ticket where you can attach small repro application which we can use by our side. 


All the best,
Vanya Pavlova
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
Tags
GridView
Asked by
Andreas
Top achievements
Rank 1
Answers by
Vanya Pavlova
Telerik team
Andreas
Top achievements
Rank 1
Share this question
or