Showing posts with label dropdownlist. Show all posts
Showing posts with label dropdownlist. Show all posts

Monday, March 26, 2012

ATLAS used in UserControl. DropDownList problem

Hi everybody
I just modified my existing well working UserControl to use ATLAS's PopUp control.
The User Control has a Textbox, a calendar and four DropDownLists for Year, Month, Hour and Minute.
When a user clicks into the textbox, calendar with DDL's popup. If user clicks on a date, then the textbox is populated with new date.
But I do have problems when the user clicks on a DropDownList. As soon as the DropDownList opens and mouse is moved on it's items to select a new value, the panel containing Calendar and DDL's disappears.
It looks like the Atlas PopUp Control assumes that the focus was moved outside the control, But in reality the DropDownList is a part of the PopUp control.
How can I fix this?

Thanks in advance
Raja

I have the same problem using the Collapsable Panel with loading controls dynamically in the .aspx Page_Load event. When I Reorder the list, using the ReorderList control, the dynamically loaded controls disappeared.

It sounds like you're running into a general ASP.NET pattern - if you're dynamically adding controls, you'll need to re-add them after a postback as well.


My user control does not contain any dynamic controls and it works very well without ATLAS. I just think that ATLAS assumes the opened DropDownList itema as a new layer and so it thinks that the focus was moved from it's own PopUp panel and simply disappears.

Raja


Hi Raja,

I think your problem has to do with the way thePopupControlExtender handles theblur andfocus events. If you check out the code inPopupControlBehavior.js you'll probably see where things are going wrong. The good news is that we're looking at a better way of doing this and hope to release it in the next drop. For your current scenario though, you could modify the JavaScript code to only hide the popup when something outside it or the textbox is clicked.

Thanks,
Ted


I'm seeing the same problem in HoverExtender. The behavior that I see is that if the Panel's that's loaded is larger and outside of the region of hte target control ... then depending on where you click on the panel, you get diffeerent behaviors.

If I click on the DropDownList and navigate with the keyboard, the panel stays up.
If I click on the DropDownList and click on an item it goes way.

If I change the markup (in my case I'm dynamically generating within a template ... that's another story) to instead use a collection of RadioButtons, the panel is not dismissed.

--

In another panel I've got an embedded controller (the FlashPlayer). I've configured the flash player to not autostart (play=0). The only way to start playing is to click right. Doing so dismisses the hover panel.

Hi pstanhope,

I'm not able to reproduce this problem. Could you post a complete sample the demonstrates it? That would help a lot.

Thanks,
Ted

ATLAS update panel slower when using dial up

First let me start with I love ATLAS it definitely makes the web suck less.

I have a page with an ATLAS update panel around 3 dropdownlist boxes that are dynamically populated based on the previous selected dropdownlistbox. In the broad band world this works outstanding. On dial up however it is actually slower to use the updatepanel than to do a full post back. 15 seconds for a full post-back, 25 for just one dropdown. Any ideas, I already tried asking the customer to get broadband, that did not go over well :-)

ajax is web 2.0 stuff. And web 2.0 is born upon broad band, but not upon narrow band. If your customer want to use dialing to go online, you should persuade them to give up the idea of using altas.
Interesting answer, But I think it is flawed. First off AJAX has nothing to do with asp.net 2.0, and if I write this using AJAX I do not have a performance problem. However if I chose to use an ATLAS updatePannel I do have the performance problem. Is there a bug, perhapps with the ATLAS framework or have I missed a setting?

Atlas Update Panel DropDownList

I have a dropdownlist which has around 2300 items and is placed inside an EditTemplate of a DetailsView.

When i change the mode to edit, the detailsview does not change the mode and no error is shown. It silently stops updating. If i have lesser number of items in the dropdown it works.

I have tested the controls outside the updatepanel to check if there is anything wrong with my code, but that works fine. I also tested the dropdown outside the edit template but inside a updatepanel it works. It happens only in a edit template. Works within an item template also.

Did anybody have a similar issue?? I very much think it is a bug in the Updatepanel and i have been using updatepanels extensively. The biggest trouble is, this issue could happen after the app goes live and data keeps accumulating.

Datasource is objectdatasource; also tried with SQLdatasource(no luck).

PartialRendering is on. (If it is switched off it works).

UpdatePanel mode is conditional (Making it always doesnot work)

Filling the items of dropdownlist in the dropdownlist_prerender (without a datasource) also gives the same error.

Id there any property that i am missing somewhere??

Best regards,

chandrakanth

Is this some kind of sync issue between the trigger event and update itself since you have 2300 items?Exactly how are you using the dropdown within the edit template? Are the values used in the update process some how?

The drop down has key-value pairs with keys as Ids and values as the designations. The Id is bound to a field of the datasource. I havel also removed the binding between dropdown and the datasource field, making it a simple dropdown with a datasource having 2300 items, and the mode does not change yet.

These values are not used anywhere in the update process.

Since the event is raised by a control inside the update panel, i am not using any triggers.

I have even tried to make everything from scratch in a test page to rebuild the issue.(Inorder to remove any effects of other controls on the updateprocess. No luck again.

chandrakanth


Some more updates on the update panel issue.

The dropdown works as long as the size is less than or equal to 894. Anything more than that which as is in my case the issue shows up. Any suggestions with a workaround for this?


Figured it out.

The issue was with the data. Data having some non ascii characters was behaving in that manner.

hope it helps others who might have a similar issue.

chandrakanth

Wednesday, March 21, 2012

Atlas renders duplicated buttons...

Hi, All:

Please check the following code:

put updatePanel within a table will duplicate button and dropdownlist.

remove table tag is fine though.

Is this a bug?

---------------------

<%@dotnet.itags.org.PageLanguage="C#" %>

<!DOCTYPEhtmlPUBLIC"-//W3C//DTD XHTML 1.0 Transitional//EN""http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<scriptrunat="server">

void Button1_Click(object sender,EventArgs e)

{

listMatter.Items.Clear();

listMatter.Items.Add("text1");

listMatter.Items.Add("text2");

}

</script>

<htmlxmlns="http://www.w3.org/1999/xhtml">

<headrunat="server">

<title>Untitled Page</title>

</head>

<body>

<formid="form1"runat="server">

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

</atlas:ScriptManager>

<div>

<table>

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

<Triggers>

<atlas:ControlEventTriggerControlID="Button1"EventName="Click"/>

</Triggers>

<ContentTemplate>

<tr><td>

<asp:LinkButtonID="Button1"runat="server"OnClick="Button1_Click"Text="Button"/>

Matter:

</td>

</tr>

<tr><td>

<asp:DropDownListID="listMatter"runat="server"></asp:DropDownList>

</td></tr>

</ContentTemplate>

</atlas:UpdatePanel>

</table>

</div>

</form>

</body>

</html>

not to get too far off topic here but...
why would you create a table and then the update panel control?

is your intent to create a row that is updatable?
interesting concept if you are... (most would create a table cell and then the update panel or use divs instead)

i don't really know but i would look to see if using the "tbody" helps in any way
the reason why i say that is because there are instances that i have seen where the "tbody" must be present for some "features" to work properly in Atlas


Hi,

I think the problem is that the UpdatePanel wraps its content with a div or span tag, thus the markup for the table is like:

<table>
<div><!-- div as first child of table -->
...
</div>
</table>
and this cause problems when replacing the updated HTML using the DOM. I would place the UpdatePanel inside the cell, to wrap only the DropDownList, like meisinger suggested.