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

RadWindow problem with IE 9

14 Answers 170 Views
Window
This is a migrated thread and some comments may be shown as answers.
Emil Eriksson
Top achievements
Rank 1
Emil Eriksson asked on 27 Apr 2011, 10:08 AM
Hi Telerik Team
I´m using Radwindow and when IE did their last update to version 9 the Radwindow fails to open. I have not written the code so I don´t know why it fails. The page works like a charm in IE7,8 and firefox.

Here is example code.

 

<telerik:RadWindow ID="RadWindow1" VisibleOnPageLoad="false" Title="Visa tid" IconUrl="~/App_Themes/Classic/Images/MenuItems/book.png"

 

 

runat="server" Modal="false" Top="0px" Left="0px" VisibleStatusbar="false" VisibleTitlebar="true"

 

 

AutoSize="false" Width="640px" Height="340px" ShowContentDuringLoad="false" OnClientBeforeClose="window_beforeClose"

 

 

Behavior="Close" Style="z-index: 10000">

 

 

</telerik:RadWindow>

 

 

 

var currentBookingId = 0;

 

 

 

 

function openSlot(slotId, bookingId) {

 

 

 

 

if (cancelPopup) { cancelPopup = false;return; }

 

 

 

 

if (currentBookingId > 0) $("#b" + currentBookingId).removeClass("selected");

 

 

currentBookingId = bookingId;

 

$(

 

"#b" + currentBookingId).addClass("selected");

 

 

 

 

var url = "EditSlot.aspx?standalone=true&Id=" + slotId;

 

 

 

 

var oWnd = $find("<%=RadWindow1.ClientID%>");

 

 

oWnd.set_title(

 

"Laddar...");

 

 

oWnd.setUrl(url);

 

oWnd.show();

 

}

Mvh
/Emil Eriksson

14 Answers, 1 is accepted

Sort by
0
Emil Eriksson
Top achievements
Rank 1
answered on 27 Apr 2011, 10:14 AM
Upps strange formatting. Here is the code again.

  <telerik:RadWindow ID="RadWindow1" VisibleOnPageLoad="false" meta:resourcekey="RadWindowShowTime"  Title="!!Visa tid" IconUrl="~/App_Themes/Classic/Images/MenuItems/book.png"
    runat="server" Modal="false" Top="0px" Left="0px" VisibleStatusbar="false" VisibleTitlebar="true"
    AutoSize="false" Width="640px" Height="340px" ShowContentDuringLoad="false" OnClientBeforeClose="window_beforeClose"
    Behavior="Close" Style="z-index: 10000">
  </telerik:RadWindow>

      function openSlot(id, ticks) {
        var url = "";
        if (ticks != null) url = "EditSlot.aspx?standalone=true&SubmissionStrategy=close&Ticks=" + ticks + "&Id=" + id;
        else url = "EditSlot.aspx?standalone=true&SubmissionStrategy=close&Id=" + id;
        var oWnd = $find("<%=RadWindow1.ClientID%>");
        oWnd.set_title('<asp:Localize runat="server" ID="loading" meta:resourcekey="loading" Text="!!Laddar... "/>');
        oWnd.setUrl(url);
        oWnd.show();
      }
0
Georgi Tunev
Telerik team
answered on 02 May 2011, 09:44 AM
Hello Emil,

The code looks OK and is working as expected on my side. Please make sure that you are using Q1 2011 / Q1 SP1 which are IE9 compatible.
If you are indeed using one of these versions but still experience problems, it would be best to open a support ticket and to send us a sample project that will allow us to investigate what exactly is the problem.


Greetings,
Georgi Tunev
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.

0
Emil Eriksson
Top achievements
Rank 1
answered on 04 May 2011, 02:30 PM
I have a old version of telerik rad toolkit so it might be the solution to install t. I have download a new version and tried to install it but now my project fail to compile. I have swedish exceptions but it says something about "the Composition was created by a program with a later version then the current..."

Can you help me?
/Emil

0
Svetlina Anati
Telerik team
answered on 06 May 2011, 01:02 PM
Hello Emil,

I assume that the problem comes from an older version of .NET  compared to the used Telerik.Web.UI.dll.

The possible scenarios could be:

1)  If your site is on .NET 2.0, the latest version of RadControls  will not support it as explained in the article below:

http://blogs.telerik.com/stefanrahnev/posts/11-03-03/telerik_ajax_controls_net_2_0_support_discontinued_as_of_q1_2011.aspx

If this is the case, please upgrade to .NET 3.5 or 4.0.

2) If your site is on .NET 3.5, please make sure that you took the dll from the Bin35 folder - this dll is for .NET 3.5, while the dll from the folder Bin40 is for .NET 4.0.

I hope that my assumption and explanations are helpful, let me know how it goes.

Kind regards,
Svetlina
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.

0
Emil Eriksson
Top achievements
Rank 1
answered on 10 May 2011, 09:23 AM
It works great with the files from bin35 =).

We have not update Telerik since Q2 2009 so some problems occured.
We have 4 Radcomboboxes that depends on eachother. The default value is "No Filter" but after I installed the new Telerik files, the default value is the first choice in every radComboBox. Any solution to change the default value back to "No Filter"?
Regards
/Emil
BokaDoktorn 
0
Emil Eriksson
Top achievements
Rank 1
answered on 10 May 2011, 03:35 PM
This is the code where list is the datasource.
Why will the defaultItem not work?


    list = list.OrderBy(l => l.Name.Trim()).ToList();

    /* Bind the combo box */
    FilterLocationsCombo.DataSource = list;
    FilterLocationsCombo.DataBind();

    /* Add default item */
    string selectedValue = FilterLocationsCombo.SelectedValue;
    FilterLocationsCombo.Items.Insert(0, new Telerik.Web.UI.RadComboBoxItem(GetLocalResourceObject("SelectLocation").ToString(), "-1"));
    FilterLocationsCombo.SelectedValue = (clear ? "-1" : selectedValue);
0
Emil Eriksson
Top achievements
Rank 1
answered on 11 May 2011, 10:26 AM
I have found the problem and it is the RadTab-Event that fires everytime I click on a Radtab-Item.
    base.OnInit(e);
    FilterTab.TabClick += new Telerik.Web.UI.RadTabStripEventHandler(FilterTab_TabClick);
The event runs a ClearSelection-method on my RadComboboxes.

When you first enter the page  the event is not fire as default. You must click on radTabitem to do that.
My clearSelectionMethod must run when you first enter the page with my comboxes. It worked before I did the upgrade. This is pretty urgent because we have a release tomorrow and it depends on this issue.
/Emil
0
Emil Eriksson
Top achievements
Rank 1
answered on 11 May 2011, 01:29 PM
It is like the AutoPostback property is not working.
I really don´t have a clue. Can someone please help me.
/Emil
0
Dimitar Terziev
Telerik team
answered on 13 May 2011, 09:07 AM
Hello Emil,

As the name hints the TabClick event is fired when you click on a particular node. It's expected that this event is not fired upon initial page load.

My suggestion is to call your "ClearSelection" method manually when the page is loaded for the first time.

All the best,
Dimitar Terziev
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.

0
Emil Eriksson
Top achievements
Rank 1
answered on 16 May 2011, 02:47 PM
I cant run the clearSelection-method becase it destoys the functionality. I have 4 comboboxes witch datasource changes depending on the selection from the user.

If I run the ClearSelection-method before Databind the datasources in each combobox becomes the defaultvalue.

In PreRender I Load the Comboboxes with data.
The code for one of the comboboxes:
 private void LoadLocationCombo()
  {
    /* Extract the distinct locations. */
    IList<Location> list = new List<Location>();

    /* If speciality is selected, load the distinct locations for that speciality. Otherwise load all distinct locations */
    foreach (Resource r in (specialitySelected ? DistinctResources : AllDistinctResources))
      if (!list.Contains(r.Surgery.Location))
        list.Add(r.Surgery.Location);

    /* Sort the list */
    list = list.OrderBy(l => l.Name.Trim()).ToList();

    /* Bind the combo box */
    FilterLocationsCombo.DataSource = list;
    FilterLocationsCombo.DataBind();

    /* Add default item */
    string selectedValue = FilterLocationsCombo.SelectedValue;
    FilterLocationsCombo.Items.Insert(0, new Telerik.Web.UI.RadComboBoxItem(GetLocalResourceObject("SelectLocation").ToString(), "-1"));
    FilterLocationsCombo.SelectedValue = (clear ? "-1" : selectedValue);
  }

I´m very anxious to fix this. Pleeease help me.
/Emil
0
Dimitar Terziev
Telerik team
answered on 19 May 2011, 11:07 AM
Hi Emil,

In one of your previous posts you have mentioned that you need to call "ClearSelection" upon initial page load:
"When you first enter the page  the event is not fire as default. You must click on radTabitem to do that.
My clearSelectionMethod must run when you first enter the page with my comboxes."

You could clear the selection only when you load the page for the first time, not upon every post-back.

Could you clarify what is your exact requirement since I'm quite confused with the whole scenario that you are trying to implement?

Greetings,
Dimitar Terziev
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.

0
Emil Eriksson
Top achievements
Rank 1
answered on 19 May 2011, 02:47 PM
When I call the ClearSelection-Method before postback OnInit, I get the "Selection out of range" -exception everytime I bind the data on postbacks.

My RadComboboxoses depends on eachother. The data in the other comboboxes will be affected for each choise you do in one of the combos,  Example - Like the first to combos att this site. http://www.hemnet.se/

This is the code for loading the combos. I call this function on each postback from the combos.

    /* Load the combo box */
    FilterResourcesCombo.DataSource = DistinctResources; //A list of resources - The list will change for each combochoise.
    FilterResourcesCombo.DataBind(); ----------------------> BANG ---------------> "Selection out of range"

    /* Add default item */
    string selectedValue = FilterResourcesCombo.SelectedValue;
    FilterResourcesCombo.Items.Insert(0, new Telerik.Web.UI.RadComboBoxItem(GetLocalResourceObject("SelectResource").ToString(), "-1"));
    FilterResourcesCombo.SelectedValue = (clear ? "-1" : selectedValue);


/Emil
0
Dimitar Terziev
Telerik team
answered on 24 May 2011, 12:24 PM
Hello Emil,

You could get more information regarding the exception that you receive in this forum thread here.
In order to deal with it, please try the suggested workarounds.

Kind regards,
Dimitar Terziev
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.

0
Emil Eriksson
Top achievements
Rank 1
answered on 27 May 2011, 03:34 PM
I solved the problem!
I saved myComboBox.selectedvalue in a session-variable in PreRender before I call the clearSelection-method. Then I put the session-value in myComboBox.selectedvalue after myComboBox.DataBind(). Like this.

 if ((string)Session["_selectedLocation"] != "")
    {
      FilterLocationsCombo.SelectedValue = (string)Session["_selectedLocation"];
      FilterLocationsCombo.Items.Insert(0, new Telerik.Web.UI.RadComboBoxItem(GetLocalResourceObject("SelectLocation").ToString(), "-1"));
    }
    else
    {
      string selectedValue = FilterLocationsCombo.SelectedValue;
      FilterLocationsCombo.Items.Insert(0, new Telerik.Web.UI.RadComboBoxItem(GetLocalResourceObject("SelectLocation").ToString(), "-1"));
      FilterLocationsCombo.SelectedValue = (clear ? "-1" : selectedValue);
    }


Tags
Window
Asked by
Emil Eriksson
Top achievements
Rank 1
Answers by
Emil Eriksson
Top achievements
Rank 1
Georgi Tunev
Telerik team
Svetlina Anati
Telerik team
Dimitar Terziev
Telerik team
Share this question
or