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

Row is not selected when Grid lost focus

2 Answers 69 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Michal Ogluszka
Top achievements
Rank 1
Michal Ogluszka asked on 19 Feb 2009, 12:11 PM
Hi,

 is there any easy solution to have still selected row when Grid looses control? When it happens row is not selected any more. Such solution is for example in windows controls, when the row just changes colour (i.e. on grey ).

Thanks for any answer
M.

2 Answers, 1 is accepted

Sort by
0
Vlad
Telerik team
answered on 19 Feb 2009, 12:16 PM
Hi Michal,

As far as I know the grid will not deselect the the selected item when focus is lost. You can check this demo for more info:
http://demos.telerik.com/aspnet-ajax/grid/examples/client/selecting/defaultcs.aspx

Regards,
Vlad
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
0
Cartoon Head
Top achievements
Rank 1
answered on 14 May 2010, 08:02 PM
Ha!  I'm looking for exactly the opposite.

I have several grids on the same page, and would like to have it lose the highlight when a different grid is clicked.

If anything, they are all staying highlighted. 

I was able to accomplish what I needed by changing the AllowRowSelect option to "False":
<ClientSettings>    
    <Selecting AllowRowSelect="False" />   
    <ClientEvents OnRowDblClick="MyGrid_DblClick" /> 
</ClientSettings> 

And then enable a row hover color, in my .css file:

.RadGrid_Office2007 .rgHoveredRow  
{    
    background-color: #ffffff !important;    
}    

(In our case, I have alternating colors already, we just want it to highlight in white.)

That did the trick!  Now users get a visual reference for the row they are about to edit (with double-click), but it goes away when they move around the page.

Briliant!
Tags
Grid
Asked by
Michal Ogluszka
Top achievements
Rank 1
Answers by
Vlad
Telerik team
Cartoon Head
Top achievements
Rank 1
Share this question
or