Strange behavior with a datalist

4 posts, 0 answers
  1. CSurieux
    CSurieux avatar
    465 posts
    Member since:
    Jan 2007

    Posted 09 Aug 2008 Link to this post

    Hello,

    I am displaying a datalist with command buttons an images, doing paging with a request to database which selects records composing the displayed page, each paging command triggers a paged_change which read DB and bind the dataList to a SqlDataReader.

    I have ajaxifyed the paging control and the datalist in the Page_Load from codebehind, adding ajaxsettings to AjaxManager.
    DataList->Pager
    DataList->Pager
    Pager->Pager
    Pager->DataList

    I have a strange behavior: each odd request refuses to display the command buttons in the DataListItems.
    First display is Ok, pressing PageNext I get a page with DB info but no image for buttons, pressing again PageNext I get a perfect page, etc.
    When on firt page I enter in pager page 3, I get a page without images for buttons, the problem is not related to data in pages.

    Reading the page generated html, I see that the <img> or <input type="image"> are correctly generated and contain their src attribute with correct path.
    Why aren't they displayed ?
    They are exactly the same as the ones on the pages correctly displayed ?
    I have no error in IE7 on the page after display ?????


    Any idea welcome.
    CS
  2. Konstantin Petkov
    Admin
    Konstantin Petkov avatar
    1911 posts

    Posted 11 Aug 2008 Link to this post

    Hi Christian,

    I assume by
    DataList->Pager
    DataList->Pager

    you meant
    DataList->Pager
    DataList->
    DataList

    so that all the relations are set, don't you? To verify it's a matter of missing AJAX settings applied, you can wrap the DataList along with the Pager in a RadAjaxPanel only and remove the AJAX Manager/settings temporary. You can also disable AJAX to verify everything's functioning properly with regular postbacks.

    All the best,
    Konstantin Petkov
    the Telerik team

    Check out Telerik Trainer, the state of the art learning tool for Telerik products.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. CSurieux
    CSurieux avatar
    465 posts
    Member since:
    Jan 2007

    Posted 12 Aug 2008 Link to this post

    Hello Konstantin,

    I hace checked:
    1) without ant ajax, everything seems to work normally: buttons are correctly displayed on each postback
    2) with a RadAjaxPanel in place of RadAjaxManager I get the same bug.
    3) I am unable to reproduce this bug on a small project with a Page (not an ascx) with datalist and pager. Works normally.
    4) I have checked my pager composite control: all included controls have an ID, the pager render itself as a table and it call base.Render in its render method (just here for trace purpose).

    I am still blocked on this, I don't understand , may ascx only contains: 1xRadFormDecorator+1xScriptManagerProxy+1xRadAjaxPanel (or RadAjaxManager) containing 1x DataList+1x pager conmposite control.
    Nothing else.
    How could I forget something as far as I put everyting in a RadAjaxPanel.

    Thanks for ideas or directions I could explore.

    Regards
    CS
  5. Konstantin Petkov
    Admin
    Konstantin Petkov avatar
    1911 posts

    Posted 15 Aug 2008 Link to this post

    Hi Christian,

    Since this is working just fine without the AJAX configuration it should be some AJAX setting which is missing. I'm puzzled however with the note about the AJAX panel containing all the controls. Have you tried wrapping the whole UserControl in an AJAX Panel resizing in the hosting page?

    Otherwise, I'd suggest you put RadAjaxManager in the hosting page along with RadAjaxManager proxy in the user control and configure the proxy with the necessary relations.

    If you still cannot resolve the problem we will have to look into and debug your exact problematic user control. Please submit a formal support ticket through your Client.Net account where you can send a runnable sample. We will gladly investigate the issue and get back to you with our findings/resolution.

    Kind regards,
    Konstantin Petkov
    the Telerik team

    Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Back to Top