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

Strange behavior with a datalist

3 Answers 66 Views
Ajax
This is a migrated thread and some comments may be shown as answers.
CSurieux
Top achievements
Rank 2
CSurieux asked on 09 Aug 2008, 07:41 AM
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

3 Answers, 1 is accepted

Sort by
0
Konstantin Petkov
Telerik team
answered on 11 Aug 2008, 07:22 AM
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.
0
CSurieux
Top achievements
Rank 2
answered on 12 Aug 2008, 08:44 PM
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
0
Konstantin Petkov
Telerik team
answered on 15 Aug 2008, 06:00 AM
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.
Tags
Ajax
Asked by
CSurieux
Top achievements
Rank 2
Answers by
Konstantin Petkov
Telerik team
CSurieux
Top achievements
Rank 2
Share this question
or