Quantcast
Channel: ASP.NET AJAX + Ajax Control Toolkit (ACT)
Viewing all articles
Browse latest Browse all 5678

Updatepanel and tabcontainer

$
0
0

I'm facing for some months following problem:
When a list of 40 records is loaded and shown in a datalist (or repeater) (with a vertical scrollbar) I want to change for example the 39th record. In the working example (without tabcontainer) just the 39th record changes and I stay on the same position as before.
In the tabcontainer this does not work although I use a updatepanel. After i pushed on the linkbutton the repeater is loaded again but the position is now the first record and I have to use the scrollbar again.
Anyone can help??

This does not work ....
<asp:UpdatePanel ID="UpdatePanel1" runat="Server" UpdateMode="Conditional">
<ContentTemplate>
<asp:TabContainer ID="TabContainer1" runat="server" ActiveTabIndex="0" OnClientActiveTabChanged="clientActiveTabChanged" BorderStyle="None" TabStripPlacement="TopRight" VerticalStripWidth="100px"
UseVerticalStripPlacement="True" BorderColor="Silver">
<asp:TabPanel runat="server" ID="TabPanel1">
<asp:Repeater ID="rptLeerplan" runat="server" OnItemDataBound="Repeater_ItemDataBound" OnItemCommand="repeater_ItemCommand" >
<asp:Label ID="LabDoel" runat="server"></asp:Label>
<asp:LinkButton ID="lnkbtnBewaarDoel" runat="server" CommandArgument='<%#Eval("clid")%>' OnCommand="BewaarDoel_Command" ></asp:LinkButton>
<asp:Label ID="LabAantalreg" runat="server"></asp:Label>
</asp:Repeater>
</asp:TabPanel>
<asp:TabPanel runat="server" ID="TabPanel2" >
...
</asp:TabPanel>
</ContentTemplate>
</asp:UpdatePanel>

Code behind:
Protected Sub BewaarDoel_Command(ByVal sender As Object, ByVal e As CommandEventArgs)
... bind repeater ...
UpdatePanel1.Update()
End sub


This works without tabcontainer
<asp:UpdatePanel ID="UpdatePanel1" runat="Server" UpdateMode="Conditional">
<ContentTemplate>
<asp:Datalist ID="lstDoelen" runat="server" OnItemDataBound="lstDoelen_ItemDataBound" DataKeyField ="clid">
<asp:Label ID="labDoel" runat="server" ></asp:Label>
<asp:LinkButton ID="lnkbtnBewaarDoel" runat="server" CommandArgument='<%#Eval("clid")%>' OnCommand="BewaarDoel_Command"></asp:LinkButton>
<asp:Label ID="LabAantalreg" runat="server"></asp:Label>
</asp:Datalist>
</ContentTemplate>
</asp:UpdatePanel>

Code behind:
Protected Sub BewaarDoel_Command(ByVal sender As Object, ByVal e As CommandEventArgs)
... bind datalist .....
UpdatePanel1.Update()
End sub


Viewing all articles
Browse latest Browse all 5678

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>