Problem with Internet Explorer 7 and 8 paged and sorted grid

15 posts, 0 answers
  1. Clive Hoggar
    Clive Hoggar avatar
    334 posts
    Member since:
    Nov 2008

    Posted 11 Sep 2009 Link to this post

    HI

    I have just noticed a problem with a paged and sorted grid..

    In internet explorer,  the tooltip shown is always the content of the first page of results.
    After sorting or paging, the tooltips shown are always the first page.

    In Firefox or Safari, all works well and the tooltip appropriate to the item is shown.   

    It seems like Internet explorer does not action this reset code:
     Protected Sub RadGrid1_ItemCommand(ByVal source As Object, ByVal e As GridCommandEventArgs)  
            If e.CommandName = "Sort" OrElse e.CommandName = "Page" Then  
                RadToolTipManager1.TargetControls.Clear()  
            End If  
        End Sub 

    What do you suggest? ("Don't use Internet Explorer" is not of course an option!)

    BTW I am using Internet Explorer 8, but also tried it in 'compatibility mode' which is like IE7, allegedly.
    So maybe there is an IE8 issue here

    Thanks

    Clive
  2. Svetlina Anati
    Admin
    Svetlina Anati avatar
    2795 posts

    Posted 16 Sep 2009 Link to this post

    Hi Clive,

    Do you by any chance use AJAX for paging and sorting of the grid? If so, make sure that the RadToolTipmanager is also updated through AJAX when the grid is updated (e.g add it in a RadAjaxmanager settings or move it ib the same update panel as the grid). You can find a sample online demo below:

    http://demos.telerik.com/aspnet-ajax/tooltip/examples/targetcontrolsandajax/defaultcs.aspx

    As you can see there, everything works under all browsers.

    In case you need further assistance, please prepare a sample, fully runnable reproduction demo (use Northwind or a fake programmatic datasource for the grid), open a new support ticket and send it to us along with detailed explanations and reproduction steps and we will do our best to help.


    Greetings,
    Svetlina
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Clive Hoggar
    Clive Hoggar avatar
    334 posts
    Member since:
    Nov 2008

    Posted 16 Sep 2009 Link to this post

    Some additional info that might spark some ideas before I embark on the demo ...

    1 ) It also works fine in Opera, so that means it is working fine in
         three of the most popular (other than IE) : Firefox, Safari (Mac), and Opera. It is hard to see
         that there is anything amiss in the code.

    2 ) The only difference I can see between your server setup and mine is that mine
          is running IIS7  .    Is there any known IIS7/IE8 overzealous security that might prevent  
          the controls being cleared?

    Ideas anyone?

    Thanks

    Clive

  5. Clive Hoggar
    Clive Hoggar avatar
    334 posts
    Member since:
    Nov 2008

    Posted 18 Sep 2009 Link to this post

    Hi

    I have done a google search for 'asp.net + ajax + IE + IIS7 + problem' and got 46000 results, many referring to IIS7 with IE7/8
    in the context of ajax, so I am inclined to think that this seems to be a toxic combination. Could some Telerik guy who understands
    servers take a look and see if there is anything relevant there?

    Has any other reader seen a problem with IIS7 and ajax?

    I knew it was a mistake to get the 'latest' server installed, of course I could be barking up the wrong tree!

    Thanks

    Clive
  6. Paweł
    Paweł avatar
    16 posts
    Member since:
    Jan 2009

    Posted 21 Sep 2009 Link to this post

    Hi there Clive,

    I have the same problem with tooltip in grid - it always show tooltips from first page of grid.
    I'm using development server from VS 2008, and ie6 - so it doesnt look like iis7 issue.
    I'd rather think it's some combination of telerik controls, I'll try to make clear solution showing this probloem.

    If you find some solution, please let me know.

    Gr,
    Paweł
  7. Paweł
    Paweł avatar
    16 posts
    Member since:
    Jan 2009

    Posted 21 Sep 2009 Link to this post

    Ok i did prepare a sample site which thisproblem.

    Im using VS 2008 (sp1) on Windows XP pro (sp3) and telerik version 2009.2.701.35, and tested it on IE6

    Download project from - http://cbm.yetiz.pl/telerik/ToolTipProblem.zip

    On FF this example works fine - didn't test on any other.
  8. Clive Hoggar
    Clive Hoggar avatar
    334 posts
    Member since:
    Nov 2008

    Posted 21 Sep 2009 Link to this post

    Hi Pawel

    I have lost a  lot of time with this problem, but I will try your mini project and see if i get the same result.
    I trust Telerik will try it also!

    I have now managed to fire up an old PC with IE6 on it, and have also tested Google chrome browser.  
    Here is the summary by browsers I have tested.
    IE8, IE7, IE6 -  No joy;
    Firefox 3, Safari4, Opera, Google Chrome:  Perfect

    So four of the top 4 browsers are OK;  it does look like an IE problem.

    Thanks for your confirmation on pre IIS7. I have spent all day trying to get the website running on an earlier
    version of IIS (5.1) on a windows XP machine, but too many issues and I am giving up on that now.

    Regards

    Clive




  9. Svetlina Anati
    Admin
    Svetlina Anati avatar
    2795 posts

    Posted 22 Sep 2009 Link to this post

    Hi guys,

    Pawel, thank you for the provided demo, I examined it and I was able to reproduce the problem. It comes from the fact that you never clear the TargetControls collection. Please, handle the OnItemCommand event and clear the collection there as shown in the demo I provided earlier and also as shown below:

      protected void RadGrid1_ItemCommand(object source, GridCommandEventArgs e)  
        {  
            if (e.CommandName == "Sort" || e.CommandName == "Page")  
            {  
                RadToolTipManager1.TargetControls.Clear();  
            }  
     
        } 

    After I added this code to your demo, it started working as expected.

    Clive, I assume that this could also be the problem in your application as well - let me know whether this is so and whether you need further assistance.

    Greetings,
    Svetlina
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
  10. Paweł
    Paweł avatar
    16 posts
    Member since:
    Jan 2009

    Posted 22 Sep 2009 Link to this post

    Thanks Svetlina,

    It works fine now. But why did it work ok under FF and Opera and not IE?

    Gr,
    Paweł
  11. Clive Hoggar
    Clive Hoggar avatar
    334 posts
    Member since:
    Nov 2008

    Posted 22 Sep 2009 Link to this post

    Hi Svetlina

    I do have this code in my application, (see original post) so I don't think that can be the problem for me.
    Note that for me it DOES work for Firefox, Opera, Safari and Google Chrome. It is only IE
    that the first page data is still shown after paging/sorting.

    I have seen on various asp.net and iis forums that there are issues in asp.net ajax behaviour
    with IIS7 but I am reluctant to attempt tweak IIS7 settings when the solution works in every other browser
    that I have tried. 

    Can you send me Pawels' project with your addition and I will try it in my IIS7 environment.

    Thanks

    Clive

  12. Paweł
    Paweł avatar
    16 posts
    Member since:
    Jan 2009

    Posted 22 Sep 2009 Link to this post

    Clive,

    Here you go: http://cbm.yetiz.pl/telerik/ToolTipProblem2.zip

    This is updated project, it works for me.

    Gr,
    Paweł
  13. Rok
    Rok avatar
    20 posts
    Member since:
    Apr 2008

    Posted 22 Sep 2009 Link to this post

    Hi,
    Same thing for me, It worked well on IIS6, now that the site has been moved to IIS7 some content is not rendered at all (especially if a user clicks back button). Works well in all browsers but IE. Rendermode is set to inline:

            protected void RadAjaxManagerAgencia_AjaxSettingCreating(object sender, Telerik.Web.UI.AjaxSettingCreatingEventArgs e)
            {
                e.UpdatePanel.RenderMode = UpdatePanelRenderMode.Inline; 
            }

    Thx
  14. Clive Hoggar
    Clive Hoggar avatar
    334 posts
    Member since:
    Nov 2008

    Posted 22 Sep 2009 Link to this post

    Hi folks

    Thanks Pawel. Your test ran ok for me on internet explorer so I concluded that the controls
    were not being cleared, despite the code being there in my version, and no errors being flagged.

    So I deleted and recreated the Grid itemCommand event in vwd instead of copy/paste
    from the vb version generated by the CodeConverter. And it works now! 

    A '1' was added to the 'RadGrid1_ItemCommand' that made all the difference.. 
    Lesson learned - always create the event at design time and then add in the code.

    Thanks

    Clive

    Protected Sub RadGrid1_ItemCommand1(ByVal source As Object, ByVal e As GridCommandEventArgs)   
            If e.CommandName = "Sort" OrElse e.CommandName = "Page" Then   
                RadToolTipManager1.TargetControls.Clear()   
            End If   
        End Sub  
     
  15. Paweł
    Paweł avatar
    16 posts
    Member since:
    Jan 2009

    Posted 22 Sep 2009 Link to this post

    I'm happy I could help in some way.

    About events, I always copy paste event name from asxp to cs ;)

    Paweł
  16. Svetlina Anati
    Admin
    Svetlina Anati avatar
    2795 posts

    Posted 22 Sep 2009 Link to this post

    Hi guys,

    Straight to your questions:

    Pawel, I am glad I could help you solve the problem. I cannot tell you exactly what causes this IE behavior because this will require some further research about browser specific behavior. What I assume is that there is some difference in the controls initialization and the time point this happens because the different browsers work with some small differences in the speed but this is only an assumption. However, even if that worked under IE without clearing the TargetControls collection, it is strongly recommended to do so because otherwise it gets populated with new and new controls, the rendered HTML will get bigger and bigger and this will influence the performance without a benefit.

    Rok, there are known issues with MS AJAX framework and the Back button of the browser - note that this is related to the framework itself and not to RadControls, which are simply based on it. You can find more information about this on the net, e.g start from here:

    http://www.google.bg/search?hl=bg&rlz=1W1WZPA_en&q=browser+back+button+ajax&meta=

    Clive, I am glad that your problem was also solved, such cases are part of  the reasons we need to examine reproduction demos to see what is exactly happening and this helps a lot to provide you with a faster and better support.


    Guys, I hope that my assistance was helpful for you, in case you experience any furtehr problems, do not hesitate to contact us again, we will be glad to help!


    Regards,
    Svetlina
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Back to Top
UI for ASP.NET Ajax is Ready for VS 2017