Hello,
I've created a portal page much like the one from this example:
http://demos.telerik.com/aspnet-ajax/dock/examples/myportal/defaultcs.aspx
My problem is that I have one particular dock with a dynamic user control containing a RadListView. I've set AllowPaging = true and created the Paging mechanism as such in my LayoutTemplate:
My problem is that the paging isn't working as in the example. In the example you have a datasource from a .rss, but in my code I am linking the datasource to a List<T> type. I also noticed that every time i press 'next' or 'prev' it triggers the page_load or onneeddatasource methods which recreate and bind the data again...so maybe this is whats causing the issue. But I don't know how to get around to this. I tried using Page.Ispostback in my user Control but fail to get the correct postback because it is getting the state of the Parent page's postback and not the usercontrol's.
Does anybody know how to set up paging correctly in this scenario?
Thanks!
I've created a portal page much like the one from this example:
http://demos.telerik.com/aspnet-ajax/dock/examples/myportal/defaultcs.aspx
My problem is that I have one particular dock with a dynamic user control containing a RadListView. I've set AllowPaging = true and created the Paging mechanism as such in my LayoutTemplate:
<div style=
"float: left; margin-left: 30%;"
>
<asp:Button runat=
"server"
ID=
"btnFirst"
CommandName=
"Page"
CommandArgument=
"First"
Text=
"First"
Enabled=
"<%#Container.CurrentPageIndex > 0 %>"
Font-Size=
"10px"
/>
<asp:Button runat=
"server"
ID=
"btnPrev"
CommandName=
"Page"
CommandArgument=
"Prev"
Text=
"Prev"
Enabled=
"<%#Container.CurrentPageIndex > 0 %>"
Font-Size=
"10px"
/>
<span style=
"vertical-align: top; position: relative; top: 4px"
>Page
<%#Container.CurrentPageIndex + 1 %>
of
<%#Container.PageCount %>
</span>
<asp:Button runat=
"server"
ID=
"btnNext"
CommandName=
"Page"
CommandArgument=
"Next"
Font-Size=
"10px"
Text=
"Next"
Enabled=
"<%#Container.CurrentPageIndex + 1 < Container.PageCount %>"
/>
<asp:Button runat=
"server"
ID=
"btnLast"
CommandName=
"Page"
CommandArgument=
"Last"
Font-Size=
"10px"
Text=
"Last"
Enabled=
"<%#Container.CurrentPageIndex + 1 < Container.PageCount %>"
/>
</div>
My problem is that the paging isn't working as in the example. In the example you have a datasource from a .rss, but in my code I am linking the datasource to a List<T> type. I also noticed that every time i press 'next' or 'prev' it triggers the page_load or onneeddatasource methods which recreate and bind the data again...so maybe this is whats causing the issue. But I don't know how to get around to this. I tried using Page.Ispostback in my user Control but fail to get the correct postback because it is getting the state of the Parent page's postback and not the usercontrol's.
Does anybody know how to set up paging correctly in this scenario?
Thanks!