DataPager loses style in IE on callback

2 posts, 0 answers
  1. Derek Swanson
    Derek Swanson avatar
    4 posts
    Member since:
    May 2010

    Posted 25 Mar 2011 Link to this post


    I am using a DataPager inside a ListView and I've also tried outside a ListView.  The problem I have is that when the DataPager first loads I am dynamically checking the number of pages I have within the ListView and if it's one page, I hide the DataPager.  When I tried putting the DataPager inside the ListView I use the "Container.PageCount" trick to either make it visible or hidden.

    While that works fine, the problem arises when the DataPager is hidden initially and then after an asynchronous postback, the DataPager loses all its CSS.  The next and previous buttons, for example, are just tiny squares with no text and no style.  If, however, the DataPager is not hidden on page load and then I perform a callback, the style is just fine.  So this only happens if the DataPager is hidden initially AND the browser is IE.  I've tested this on IE 8.0 with standard and compatibility mode and also IE 9.0

    My application has multiple playlists and when I click a playlist various items will appear that sometimes has more than one page. So I want to be sure to only show the DataPager when the page exceeds one.  I've tried putting everything in an updatepanel and I also tried using the RadAjaxManager, both having the same result.

    Any idea as to why this happens?  Thanks!
  2. Galin
    Galin avatar
    526 posts

    Posted 31 Mar 2011 Link to this post

    Hi Derek,

    I cannot replicate the described issue. Please download my sample project that is attached to this forum post. I would appreciate it if you could provide some more details about your scenario. Alternatively you can modify my demo to help me reproduce the problem locally.

    All the best,
    the Telerik team
Back to Top