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

Apply Hover style to CurrentItem

4 Answers 161 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Vojtech Prehnal
Top achievements
Rank 1
Vojtech Prehnal asked on 01 Jun 2010, 06:15 PM
Hi at Telerik,
I really like your office themes. Currently I need to highlight CurrentItem in my RadGridView. I know I can synchronize SelectedItem with CurrentItem - as a result CurrentItem has the same style as it was selected - but this is not exactly what I want to do because of two reasons:
    1) one of the cells in CurrentItem is CurrentCell (this cell is highlighted), but I don't want to highlight this cell
    2) I like your hover style much more than the style applied to the selected row :-)

What I would really like is to apply hover style to the row with CurrentItem. Is this possible?

Thanks in advance for your response!

4 Answers, 1 is accepted

Sort by
0
Kalin Milanov
Telerik team
answered on 07 Jun 2010, 09:51 AM
Hi Vojtech Prehnal,

To achieve the results you are after you will have to make the following two modifications to the templates of the row and the cell.

1. In the template of the row find the Selected state and change the animation to affect the MouseOver visual (just like the MouseOver state).
2. In the template of the cell - remove the animation from the Current state.

Attached I am also sending you a sample application which does just that. I hope you will find it useful.

Best wishes,
Kalin Milanov
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
Vojtech Prehnal
Top achievements
Rank 1
answered on 07 Jun 2010, 11:05 AM
Oh, great! That was exactly what I needed! Thank you!

However, although this solution works, it has some limitations: I'd like my users to be able to select from different telerik graphic themes (that are really great looking, by the way) and this solution is made for black_office theme only, this is the main limitation. I know this will be really a piece of work, may I ask for solution with RowStyleSelector and RowStyles with this functionality for individual themes?

In connection with this problem I'd like to suppose some suggestions for future development:
  • Could it be possible to expose CurrentItemStyle/CurrentRowStyle and HoverRowStyle? Then this solution could be much more simple: radGridView1.CurrentRowStyle = radGridView1.HoverRowStyle;
  • Or there could be some property in the RadGrid, i.e. RowSelectMode={ EntireRow,  IndividualCell } which would enable/disable to select (make current) entire rows instead of individual cells. If EntireMode would be enabled, then the current row would have the same style as hovered row.
  • Or the simplest one: current row could have the same style as hovered row by default (independently from being selected/unselected - selected rows could be distinguished simply by checkboxes in SelectColumn). I guess more users (like me) would appreciate this behavior.
  • Another thing is that I would appreciate possibility to define action, that happens on mouse click. Currently, if user clicks on some row, this row is selected. But what if I don't want to select this row but only to make this row current? Preferably with hover-like style...

Anyway, your animated hover style is really great looking and I really enjoy to work with your grid, even with current functionality :-)

0
Accepted
Kalin Milanov
Telerik team
answered on 10 Jun 2010, 08:40 AM
Hello Vojtech Prehnal,

I have updated the sample to utilize StyleSelectors. I hope this was what you were after.
As for the suggestions you made - it is a long talk we have both on the forums and internally and right now we do not have immediate plans of implementing additional properties regarding MouseOver, Current, Selected, Edit, ReadOnly, Disabled, Sorted, etc ... This does mean we will not do it, we are just looking for the best way to do so.

Greetings,
Kalin Milanov
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
Vojtech Prehnal
Top achievements
Rank 1
answered on 10 Jun 2010, 08:50 AM
Thanks for your replies and solutions!
Tags
GridView
Asked by
Vojtech Prehnal
Top achievements
Rank 1
Answers by
Kalin Milanov
Telerik team
Vojtech Prehnal
Top achievements
Rank 1
Share this question
or