
AlessandroD
Top achievements
Rank 1
AlessandroD
asked on 11 Apr 2011, 08:11 PM
In a hierarchical grid, how can I get the over effect in only master table but NOT in detail table?
The EnableRowHoverStyle gives me the effect both in master and detail table.
The EnableRowHoverStyle gives me the effect both in master and detail table.
3 Answers, 1 is accepted
0

Princy
Top achievements
Rank 2
answered on 12 Apr 2011, 11:15 AM
Hello Alessandro,
The following code snippet shows how to disable RowHover for detail table.
ASPX:
Java Script:
CSS:
Thanks,
Princy.
The following code snippet shows how to disable RowHover for detail table.
ASPX:
<
ClientSettings
EnableRowHoverStyle
=
"true"
>
<
ClientEvents
OnRowMouseOver
=
"RowMouseOver"
/>
</
ClientSettings
>
Java Script:
function
RowMouseOver(sender, eventArgs) {
// 'Detail' is the DetailTable name
if
(eventArgs.get_tableView().get_name() ==
"Detail"
) {
var
className = $get(eventArgs.get_id()).className;
//Checking for row type
if
(className.match(
"Alt"
))
// Alternative Row
$get(eventArgs.get_id()).className =
"MyAltClass"
;
else
$get(eventArgs.get_id()).className =
"MyClass"
;
}
}
CSS:
<style type=
"text/css"
>
.MyClass
{
padding-left
:
7px
!important
;
padding-right
:
7px
!important
;
border-style
:
solid
!important
;
border-width
:
0
!important
;
border-bottom-width
:
1px
!important
;
padding-top
:
4px
!important
;
padding-bottom
:
3px
!important
;
border
:
#f7f7f7
!important
;
background
:
#f7f7f7
!importan
}
.MyAltClass
{
padding-left
:
7px
!important
;
padding-right
:
7px
!important
;
border-style
:
solid
!important
;
border-width
:
0
!important
;
border-bottom-width
:
1px
!important
;
padding-top
:
4px
!important
;
padding-bottom
:
3px
!important
;
border
:
#f2f2f2
!important
;
background
:
#f2f2f2
!important
;
}
</style>
Thanks,
Princy.
0

AlessandroD
Top achievements
Rank 1
answered on 12 Apr 2011, 07:40 PM
Thanks, tomorrow I'll try.
You have a way to achieve the same effect for the property AllowRowSelect, to ensure that it works only in the master table?
You have a way to achieve the same effect for the property AllowRowSelect, to ensure that it works only in the master table?
0
Hello AlessandroD,
In the OnRowSelecting client-side event you can check if the currently selected item belongs to the MasterTableView or not. If not, then cancel the event. The approach is rather similar to the one Princy illustrated.
Greetings,
Iana
the Telerik team
In the OnRowSelecting client-side event you can check if the currently selected item belongs to the MasterTableView or not. If not, then cancel the event. The approach is rather similar to the one Princy illustrated.
Greetings,
Iana
the Telerik team
Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.