Showing posts with label selection. Show all posts
Showing posts with label selection. Show all posts

Saturday, March 24, 2012

Dropdowns inside updatepanel flash on postback.

I have 2 dropdown controls inside an updatepanel. One is disabled or enabled dependent on the selection of the other dropdown. The disabled one has its autopostback property set to false. The other one has autopostback=true. When I make selection in dropdown 1, both dropdowns flash. Is there a way to prevent the redrawing of the controls and just have the data in them update?

Thanks,

John

Put the both the DropDownlist control in to its own UpdatePanel.And make the second updatepanel Updatemode ="Conditional" and when you want to second DDL to be enable do it in the code and call the update() method in the UpdatePanel two ..

refer the following link for more information

http://asp.net/ajax/documentation/live/overview/UpdatePanelOverview.aspx

DropdownList OnSelectedIndexChanged event within ModalPopupExtender

I have aModalPopupExtender with two DropdownLists. I want to populate the second dropdownlist dynamically base on the user selection in the first dropdownlist. Once user selects values from both dropdown lists, then I want to postback the entire page.

But the OnSelectedIndexChanged event of the dropdownlist is not firing whenever the selection is changed.

Is this possible withinModalPopupExtender? Appreciate your help.

You may want AutoPostBack="true" and an UpdatePanel.

Wednesday, March 21, 2012

DropDownList flashing when inside an UpdatePanel

Hi,

Does anyone know why the second DropDownList in the following code 'flashes' when the selection is changed in the first one? - and how I can prevent this?

<atlas:ScriptManagerID="ScriptManager1"runat="server"EnablePartialRendering="true"/>

<asp:DropDownListID="DropDownList1"runat="server"AutoPostBack="true">

<asp:ListItem>One</asp:ListItem>

<asp:ListItem>Two</asp:ListItem>

<asp:ListItem>Three</asp:ListItem>

</asp:DropDownList>

<atlas:UpdatePanelID="UpdatePanel1"Mode="Conditional"runat="server">

<Triggers>

<atlas:ControlEventTriggerControlID="DropDownList1"EventName="SelectedIndexChanged"/>

</Triggers>

<ContentTemplate>

<asp:DropDownListID="DropDownList2"runat="server"AutoPostBack="true">

<asp:ListItem>Flashing option one</asp:ListItem>

<asp:ListItem>Flashing option two</asp:ListItem>

<asp:ListItem>Flashing option three</asp:ListItem>

</asp:DropDownList>

</ContentTemplate>

</atlas:UpdatePanel>

I believe you need to put the first drop down list in an update panel too. Also set to conditional and without any triggers.

<atlas:ScriptManagerID="ScriptManager1"runat="server"EnablePartialRendering="true"/>

<atlas:UpdatePanelID="UpdatePanel1"Mode="Conditional"runat="server">
<ContentTemplate>
<asp:DropDownListID="DropDownList1"runat="server"AutoPostBack="true">
<asp:ListItem>One</asp:ListItem>
<asp:ListItem>Two</asp:ListItem>
<asp:ListItem>Three</asp:ListItem>
</asp:DropDownList>
</ContentTemplate>
</atlas:UpdatePanel>

<atlas:UpdatePanelID="UpdatePanel2"Mode="Conditional"runat="server">
<Triggers>
<atlas:ControlEventTriggerControlID="DropDownList1"EventName="SelectedIndexChanged"/>
</Triggers>
<ContentTemplate>
<asp:DropDownListID="DropDownList2"runat="server"AutoPostBack="true">
<asp:ListItem>Flashing option one</asp:ListItem>
<asp:ListItem>Flashing option two</asp:ListItem>
<asp:ListItem>Flashing option three</asp:ListItem>
</asp:DropDownList>
</ContentTemplate>
</atlas:UpdatePanel>


Many thanks for the reply, but unfortunately I still got the same problem with your fix - however - I have since downloaded Internet Explorer 7 beta 2 and the problem has gone away with that...

Thanks,

Keith


I'm having the same problem - I have a drop down that populates the Gridview depending on the selected value. I have tried the suggested soultion with a UpdatePanel control around my drop down list and another around my GridView.

Anyone have any other suggestions other than to try IE 7?

Thanks
I am having the same problem. The problemgoes away in IE 7. I think the problem is with only drop down list andlistbox control. All other other control like textboxes do not flash.As far i know drop down and listbox are not rendered in the same wayhas textboxes...i can think it has to do with IE6...i may be wrong...

Murali

For me, this flicker only occurs on pages that have a Flash movie embedded in the page. I am using the Cascading Drop Down from the Atlas Control Toolkit and everywhere that there is a flash movie, I get the flicker, if I remove the movie, the flicker goes away.

Any thoughts?


Hi, here it happen the same...dropdown and listitem refresh on IE6....

really dont know why it happens on microsoft browser and not happen on firefox....

anyone knows how to fiz it on IE6? i cant find a way.

Has anyone found a way to solve this with IE6?

As long as they are outside of the UpdatePanel it works fine.


From what I've seen and read no... At least not that I've found.


Does anybody know if this issue been resolved in CTP july release

Thanks

Murali Bala


Hi,

DropDownList And ListBox are windows controls, so there is no way to stop this flicker unless MS themselves release some patch for pre-IE7 browsers. If you notice...No HTML control can draw over a DropdownList.