Telerik Controls – CSS Lost on Page Postback

Author posted by Jitendra on Posted on under category Categories ASP.NET and tagged as Tags , , with 1 Comment on Telerik Controls – CSS Lost on Page Postback

Telerik Controls – CSS Lost on Page Postback in Chrome and Mozilla firefox

After long time i am writing this tips on my blog.
This is very small but usefull trick about telerik controls.

Telerik controls like “Tree View”, runs fine in Internet explorer but it fails loading CSS in Mozilla or chrome. To overcome this, use below line of code in Page_Load method.

protected void Page_Load(object sender, EventArgs e)
{
RadTreeView1.EnableAjaxSkinRendering = true;
}

I hope this would help. 🙂

Page loads multiple times in Rad Window

Author posted by Jitendra on Posted on under category Categories ASP.NET and tagged as Tags , with Leave a comment on Page loads multiple times in Rad Window

Solution of Multiple time page load problem of Telerik Rad Window.

In Previous article, i have discussed the multiple times firing of telerik Rad Window and its solution at code side. (C#)

In this article i will provide solution of same problem in Javascript style. 🙂

How to set the problem of loading popup three time…

  1. Any page must have only one RadWindowManager, if have more than one manager then usually it sets the setting of first manager…. Ambiguity
  2. ReloadOnShow must be false. Instead of this use below technique.

Create a random javascript number and send as a URl parameter while opening from client side, in this way, it will ensure to load page with reload option. And therefore no need of this flag.

Continue reading “Page loads multiple times in Rad Window”

Telerik RadWindow Pop up Problem in Chrome and safari

Author posted by Jitendra on Posted on under category Categories ASP.NET and tagged as Tags , with 1 Comment on Telerik RadWindow Pop up Problem in Chrome and safari

Telerik Popup Window Height is not set in Safari and Chrome (Apple Webkit Browsers)

Recently i have faced one issue with display of Telerik Rad Window on Apple Webkit browsers (Chrome and safari).

The problem was, the window appeared cropped in Chrome and safari. the height attribute of body tag wasn’t working properly.

After lots of trial and googling I found one work around to solve this issue.

Set the contentFrame after show of Telerik pop up from Client side to 100%, and it will save your time. 🙂

 var oWindow = $find("<%=radAddCD.ClientID%>;");
 if(oWindow)
 {
 oWindow.show();
 var contentFrame = oWindow.get_contentFrame();
 contentFrame.style.height = "100%";
 return false;
 }

Clear ASP page cache – Page_Load() firing multiple time in RadWindow Popup

How to prevent the multiple Page load event in case Telerik Rad Window Popup is used and Clear ASP page cache.

Setting ReloadOnShow property of RadWindow for Popup to true causes its Page_load to be executed multiple times hence redundant multiple database calls causing to some extent of performance hit.

ReloadOnShow needs to be  set to true since page_load/refresh of Popup wasn’t firing on subsequent opens.

Solution

We can set ReloadOnShow to false and use alternative code in page_load as following in C#:

below code will clear the cache of ASPX page and thus reloaded every time in browser.

Note : you should run these statement before sending any HTML to the user. If in doubt, use Respose.Buffer = True to buffer all html

Response.Cache.SetCacheability(HttpCacheability.NoCache);
Response.Cache.SetNoServerCaching();
Response.Cache.SetNoStore();
Response.AppendHeader("Pragma", "no-cache");
Response.Expires = -1;
Response.CacheControl = "no-cache";

Find all possible solution at this URL

Rad Tooltip overlaps the target control – solution

Author posted by Jitendra on Posted on under category Categories ASP.NET and tagged as Tags with Leave a comment on Rad Tooltip overlaps the target control – solution

Telerik Tooltip Problem – overlaps the target control in case of scrolling

Hi Readers,
This time i am here for the Telerik Users. The most common problem faced by the Telerik Toltip User is that The telerik tooltip overlaps the target control. you can find the problem in below image.

Telerik Tooltip, Rad Control Tooltip problem

To solve this problem we need to add the client side script in Telerik Tooltip for OnClientBeforeShow event.

like this:

<telerik:RadToolTip OnClientBeforeShow="OnClientBeforeShow" Width="200" TargetControlID="lblTooltip"
 ID="RadToolTip1" runat="server">
        Lorem ipsum dolor sit amet, vitae ut vitae accumsan dis mauris malesuada, ultricies risus,
        Lorem ipsum dolor sit amet, vitae ut vitae accumsan dis mauris malesuada, ultricies risus,
        </telerik:RadToolTip>

Add below javascript in your ASPX page.

 <script type="text/javascript">
    function OnClientBeforeShow(sender, args)
        {
           sender._popupBehavior.set_keepInScreenBounds(false);
        }
    </script>

And, thats its. The problem is solved.  pretty cool hmm 🙂

Telerik Tooltip, Rad Tooltip solution

Telerik RadSchedular Tips and Tricks

Author posted by Jitendra on Posted on under category Categories ASP.NET and tagged as Tags with Leave a comment on Telerik RadSchedular Tips and Tricks

Change the style of the Today Cell in Month View and Bind Extra Column / Add Argument in RadSchedular

Change the style of the Today Cell in Month View

Lots of time, we are in need in telerik control that todays date should be highlighted. There is no need in case of Day View and in Week View.  But in month view, most of the times we confused between any event and todays date. So below is few CSS hacks which can be used in Telerik Controls.

div.RadScheduler_#skinName# .rsMonthView
.rsTodayCell
{
background-color: #CCFF00;
color: #000;
border: 1px solid #000;
}

Example:

div.RadScheduler_Office2007 .rsMonthView .rsTodayCell
{
background-color: #FFEFB8;
color: #000;
border: 2px solid #EE9311;
}

Bind Extra Column / Add Argument in RadSchedular

Add Custom Column as follow on page load event

RadSchedulerEvent.CustomAttributeNames = new string[] { "OwnerId" };

Note: OwnerId column name must be available in DataTable

Get Value of custom Column on AppointmentCreated Event

String ownerId = e.Appointment.Attributes["OwnerId"];

Opening RadWindow from another RadWindow – Telerik Control

Author posted by Jitendra on Posted on under category Categories ASP.NET and tagged as Tags with Leave a comment on Opening RadWindow from another RadWindow – Telerik Control

Opening RadWindow from another RadWindow:

Telerik Control in ASP.NET
Telerik Control in ASP.NET

Sometime it may require opening the radwindow from another radwindow. But believe me; it will not be easy.Problems I faced were:

  • New window opened behind the parent radwindow.
  • New window open in area of parent window only. So we cannot resize the window as per required.
    To overcome all these properties:

Create a java script function which will open the RadWindow in parent page. We will call this function from Radwindow to open new Radwindow so that new window should have complete screen as a width and height.

function OpenParentWnd()
{
var oWnd = $find("<%=Parent.ClientID %>");//Parent is radwindow ID name
oWnd.show();
}

In current RadWindow, call the above function like this:

function CreateWindowInParent()
{
//One way to open a window from parent page
var oBrowserWnd = GetRadWindow().BrowserWindow;
oBrowserWnd.OpenParentWnd();
}