Bookmark and Share
Showing posts with label Telerik ASP.NET Ajax. Show all posts
Showing posts with label Telerik ASP.NET Ajax. Show all posts

Wednesday, May 09, 2012

How to show RadNotification inside an IFRAME

The Telerik RadNotification is a great component, you can show beautiful notifications on the web using little code.

There’s a  problem, if you host your aspx page inside an IFRAME the RadNotification element is positioned without considering the scrolling of the parent window.

The solution uses the RadNotification OnClientShown event

Server side:

RadNotification1.OnClientShown = "ShowNotification";





Client Side:




function ShowNotification(sender, eventArgs) 
{
//check if the page is inside a frame
if (window.location != window.parent.location)
{
if (sender.get_popupElement()!=null)
{
var leftPos = $(sender.get_popupElement()).position().left;
sender.moveTo(leftPos, window.parent.window.scrollY);
}
}
}





That’s all, hope it helps

Monday, January 23, 2012

How to remove Telerik RadGrid selected Row Style

If you need to remove the selected row style applied to the rbSelectedRow element, here is the Css code:

/* override selected row*/

.RadGrid_Office2010Silver .rgRow td
{
border-color:#FFFFFF #FFFFFF #FFFFFF #FFFFFF !important;
}

.RadGrid_Office2010Silver .rgAltRow
{
background:none repeat scroll 0 0 #eee !important;
}

.RadGrid_Office2010Silver .rgAltRow td
{
border-color:#F1E9DC #F1E9DC #F1E9DC red !important;
}

.RadGrid_Office2010Silver .rgRow
{
background: inherit !important;
}

.RadGrid_Office2010Silver .rgRow td, .RadGrid_Office2010Silver .rgAltRow td
{
border-left: solid 1px #ddd!important;
padding-left: 7px !important;
}

/* finally, need to put this one back in */

.RadGrid_Office2010Silver .rgHeader:first-child, .RadGrid_Office2010Silver th.rgResizeCol:first-child, .RadGrid_Office2010Silver .rgFilterRow > td:first-child, .RadGrid_Office2010Silver .rgRow > td:first-child, .RadGrid_Office2010Silver .rgAltRow > td:first-child
{
border-left: 0 none !important;
padding-left: 8px !important;
}

.RadGrid_Office2010Silver .rgSelectedRow > td
{
background:inherit!important;
}


Hope it helps!