I would recommend trimming down your lists; 6000 items is a bit much. I have an example of this approach, see this demo:http://www.visoftinc.com/samples/CustomerSearch.aspx
Are you trying to use something like the UpdateProgress to give notifications to the user? You can have multiple UpdateProgress controls in a page, and you can also emulate a modal display (seehttp://blogs.visoftinc.com/archive/2007/09/10/modalupateprogress.aspx).
Also, have a look athttp://asp.net/AJAX/Documentation/Live/tutorials/CreatingPageUpdatePanel.aspx for using Multiple UpdatePanels on a page.
Hope this helps!
-Damien
Keep in mind that the ViewState for your entire page is sent back to the server on any partial postback, regardless of how small an area it's visibly updating. On top of that, the entire page life cycle is executed each time as well. Make sure you aren't recreating that 6,000 item list on every postback.
Sorry, i think i did not explain well. In ths second update panel i have checkbox, dropdown textbox, button and calendar. only the checkbox is enabled. When i click on the checkbox the other controls should be enabled. And yes i can check the checkbox. and the other controls are enabled. but i cant change the other controls. When i press the button the callendar should be visible but this never happends, i just press the button end nothing is going on. Strange. And 6000 reitems it might happend sometimes, but most of the time it will be 10 or 50. I cant trim the 6000, they have to stay, the database has 10 -20 times more records.
Here is my code:
<asp:ScriptManagerid="ScriptManager1"runat="server"EnableViewState="False">
</asp:ScriptManager>
<!--first UpdatePanel -->
<asp:UpdatePanelid="UpdatePanel2"runat="server"><contenttemplate><fieldset>
<TABLEstyle="WIDTH: 100%"cellSpacing=0cellPadding=0border=0><TBODY>
<TR><TDstyle="WIDTH: 100%">Name<asp:TextBoxid="TextBox1"runat="server"Width="75%"></asp:TextBox><asp:Buttonid="Button1"onclick="Button1_Click"runat="server"Text="..."></asp:Button></TD></TR>
<TR><TDstyle="WIDTH: 100%">;
<divid="Container"onclick="__doPostBack('ListBox1', '');"><asp:ListBoxid="ListBox1"runat="server"Width="90%" AutoPostBack="True"OnSelectedIndexChanged="ListBox1_SelectedIndexChanged"></asp:ListBox></div></TD></TR><tr><td><divid="CustInfo"runat="server"></div></td></tr></TBODY></TABLE>
</fieldset></contenttemplate>
</asp:UpdatePanel>
<!--second UpdatePanel -->
<asp:UpdatePanelid="UpdatePanel1"runat="server"><contenttemplate>
<FIELDSET><DIVid="Div1"onclick="__doPostBack('CheckBox1', '');"><asp:CheckBoxid="CheckBox1"runat="server"Text="Reminder"AutoPostBack="True"__designer:wfdid="w8"OnCheckedChanged="CheckBox1_CheckedChanged"></asp:CheckBox> Action: <asp:DropDownListid="DropDownList1"runat="server"Width="123px"OnSelectedIndexChanged="DropDownList1_SelectedIndexChanged"AutoPostBack="True"__designer:wfdid="w9"Enabled="False">
<asp:ListItem>Call a client</asp:ListItem>
<asp:ListItem>Email the client</asp:ListItem>
<asp:ListItem>Meeting</asp:ListItem>
<asp:ListItem>Other</asp:ListItem>
</asp:DropDownList><asp:TextBoxid="TextBox3"runat="server"CssClass="edit_class"__designer:wfdid="w10"Visible="False"></asp:TextBox> Due Date<asp:TextBoxid="TextBox5"runat="server"Width="109px"__designer:wfdid="w11"Enabled="False"></asp:TextBox><asp:Buttonid="Button2"onclick="Button2_Click1"runat="server" Text="..."__designer:wfdid="w12"Enabled="False"></asp:Button> <asp:Calendarid="Calendar1"runat="server"Width="220px"Font-Size="8pt"Height="170px"__designer:wfdid="w13"Visible="False"OnSelectionChanged="Calendar1_SelectionChanged"ForeColor="#003399"DayNameFormat="Shortest"BackColor="White"Font-Names="Verdana"BorderWidth="0px"CellPadding="1"BorderColor="#3366CC"><SelectedDayStyleBackColor="#009999"ForeColor="#CCFF99"Font-Bold="True"></SelectedDayStyle>
<TodayDayStyleBackColor="#99CCCC"ForeColor="White"></TodayDayStyle><SelectorStyleBackColor="#99CCCC"ForeColor="#336666"></SelectorStyle>
<WeekendDayStyleBackColor="#CCCCFF"></WeekendDayStyle><OtherMonthDayStyleForeColor="#999999"></OtherMonthDayStyle>
<NextPrevStyleForeColor="#CCCCFF"Font-Size="8pt"></NextPrevStyle><DayHeaderStyleBackColor="#99CCCC"Height="1px"ForeColor="#336666"></DayHeaderStyle>
<TitleStyleHeight="15px"ForeColor="White"BorderWidth="0px"CssClass="button_class"Font-Size="10pt"Font-Bold="True"></TitleStyle></asp:Calendar> <asp:CheckBoxid="CheckBox2"runat="server"Text="Finished"__designer:wfdid="w14"></asp:CheckBox></DIV><TRIGGERS/><ASP:ASYNCPOSTBACKTRIGGEREventName="CheckedChanged"ControlID="CheckBox1"/></FIELDSET>
</contenttemplate></asp:UpdatePanel>
I cant even change the selection of the dropdown
You should remove the _doPostBack() from the OnClick of your div containing the CheckBox. That's probably preempting the AutoPostBack of your CheckBox and causing it to run a partial postback that basically does nothing.
gt1329a:
You should remove the _doPostBack() from the OnClick of your div containing the CheckBox. That's probably preempting the AutoPostBack of your CheckBox and causing it to run a partial postback that basically does nothing.
I removed it but now I dont get the postBack of the checkbox, and this is supposed to enable all other controls in this updatepanel
Doesn't setting AutoPostBack on the CheckBox take care of that?
Try to set AutoPostBack property true of CheckBox
Autopostback is already set to true, but id does not fire when there is __doPostBack() for the other control and not for itself.
No comments:
Post a Comment