ラベル together の投稿を表示しています。 すべての投稿を表示
ラベル together の投稿を表示しています。 すべての投稿を表示

2012年3月28日水曜日

Reset a CascadingDropDown control

Can anyone tell me how to reset a group of drop down lists that are grouped together in a CCDD control? I've tried calling dropDownList1.Items.Clear(); but that's not working.

Thanks!

Jason

not sure on this one... but I think you need to call _onParentChange() on the first CascadingDropDownBehavior object... I think you can just set the ID in the CascadingDropDownProperties and then use $object('long_generated_id')._onParentChange( false );

Sorry, but I'm not following... I can't find a method or event _onParentChange for either the CCDD or the DDL itself. I'm also not sure what you mean by $object("long_generated_id"). Where to I get this ID?

Can you provide an example?

Thanks!


Hi Jason,

Jaykul's talking about setting the ID in your CascadingDropDownProperties instance which will cause an ID to be used when it is rendered to the client. However, the ID you use will get mangled and include all the names of its parent naming containers. This mangled ID is what Jaykul was referring to by "long_generated_id." See the MSDN docs onnaming containers for more information. I think one of the easiest ways to find out the long version of the name is to turn tracing on and find it in the control tree.

Thanks,
Ted
$get("<%=ddlCountry.ClientID%>").selectedIndex = 0;

$get("<%=ddlOffice.ClientID%>").selectedIndex = 0;

$get("<%=ddlSalePerson.ClientID%>").selectedIndex = 0;

$find("<%=CascadingDropDown1.ClientID%>")._onParentChange(false);

2012年3月24日土曜日

Rounded Corner Extender has problems with dynamic panels

I'm trying to create some panels, which are "glued" to the top and bottom, so the panel resize together with browser. It works fine, until I attach a Rounded Corner Extender. Then the rounded corners are positioned correct with the top, but the height are fixed somewhere near the top.

Here are the panel I try to add rounded corners to:

<asp:PanelID="PanelSideBar"runat="server"Style="position: absolute; top: 100px;left: 10px; bottom: 25px; width: 200px"BackColor="Beige"></asp:Panel>

<

ajaxToolkit:RoundedCornersExtenderID="RCExtender"runat="server"TargetControlID="PanelSideBar"></ajaxToolkit:RoundedCornersExtender>Thanks for reporting this. I have opened work itemhttp://www.codeplex.com/AtlasControlToolkit/WorkItem/View.aspx?WorkItemId=8769 for this.

2012年3月21日水曜日

rounded corners + borders?

Is there a way to get rounded corners and borders to work together? When I apply both the rounding goes away, apparently.

Hi miky,

I don't think the two play nicely together. RoundedCornersworks by building up a stepped sequence of very thin divs on the edge of your control, which doesn't really make sense if you're using a border as well. I'd recommend setting theColor andRadiusproperties ofRoundedCornersto achieve a border-like effect.

Thanks,
Ted

Thanks, Ted, for the response. Those details are good to know. I'll play around with your suggestion and report what I find.

RoundedCornersExtender and ResizableControlExtender together in IE

Hey all,

I am using both controls together for one panel. works fine in Mozilla, but in IE the hole panel seems to be positioned 20px down
and becomes a strange line on top.

Has anyone an idea what I am doing wrong?

Thanks in advance,

Pascal

Hi Pascal,

Perhaps you can post a code sample demonstrating what's going wrong. You should be able to get this to work if you're careful about the order in which you apply the extenders.

Thanks,
Ted

RoundedCornersExtender and CollapsiblePanelExtender dont work together on IE7

This code works well on Firefox.

I need to create Panels that have rounded corners and that are collapsable...

on IE7 the panel flashes and does not expand.

Thanks,

Eyal

<

asp:ScriptManagerID="ScriptManager1"runat="server"></asp:ScriptManager><divid="divFiltersHeader"><asp:PanelID="pnlFiltersHeader"Width="520"Height="30"CssClass="TransHistoryFiltersHeader"runat="server"><divstyle="float: left;padding: 5px;vertical-align: middle;">Advanced Filters</div></asp:Panel></div><divid="divFilters"><asp:Panelid="pnlFilters"CssClass="TransHistoryFiltersTable"runat="server"><p>Here come the filters !!!</p><p>filter 1</p><p>filter 2</p><p>test:<asp:DropDownListID="DropDownList1"runat="server"><asp:ListItem>test1</asp:ListItem><asp:ListItem>test2</asp:ListItem><asp:ListItem>test3</asp:ListItem></asp:DropDownList></p><p>filter 4</p></asp:Panel></div><toolkit:CollapsiblePanelExtenderID="cpeFiltersPanel"runat="server"TargetControlID="pnlFilters"ExpandControlID="pnlFiltersHeader"CollapseControlID="pnlFiltersHeader"Collapsed="true"SuppressPostBack="true">

</toolkit:CollapsiblePanelExtender><toolkit:RoundedCornersExtenderID="RoundedCornersExtender1"runat="server"TargetControlID="pnlFiltersHeader"Radius="5"></toolkit:RoundedCornersExtender>

I don't know if you were able to solve this problem or not but I had the same issue and was able to get around it. It appears that when both extenders are calling the same panel, the CollapsiblePanelExtender breaks. To solve this I simply nested thepnlFiltersHeaderpanel, as you have called it inside a new panel and a div and set Corners="Top". I also nested the area that expands and collapses inside a new panel and div and set Corners="Bottom" and pointed to each with seperate RoundedCornersExtender's. This allowed me to have a title that is one color and a bottom that expands in another color, but the form looks as if it is a continuous piece.

My solution is setup as follows (To save as much space as possible I removed all of the labels and text boxes and replaced them with ".......CONTENT..........":

<script>function pageLoad() {

document.getElementById(

'panelarea').style.display ="";

}

</script><asp:ScriptManagerID="ScriptManager1"runat="server"></asp:ScriptManager>

<

asp:PanelID="Panel3"runat="server"style="width:287px"BackColor="SteelBlue"> <div>

<asp:PanelID="Panel1"runat="server"style="cursor:hand; width:287px;"BackColor="SteelBlue"Width="180px">

......CONTENT......

</asp:Panel> </div></asp:Panel><asp:PanelID="Panel4"runat="server"style="width:287;"BackColor="Gainsboro"Width="287px"> <div> <divid="panelarea"style="display: none;"> <asp:PanelID="Panel2"runat="server"style="cursor:hand; overflow:hidden;"BackColor="Gainsboro"Width="287px"Height="0"> <div> .......CONTENT.........

</div> </asp:Panel> </div> </div></asp:Panel>

<cc1:CollapsiblePanelExtenderID="CollapsiblePanelExtender1"runat="server"TargetControlID="Panel2"CollapsedSize="0"ExpandedSize="275"Collapsed="False"ExpandControlID="Panel1"CollapseControlID="Panel1"AutoCollapse="False"AutoExpand="False"ScrollContents="False"ImageControlID="Image1"ExpandedImage="~/Images/collapse.jpg"ExpandedText="Hide Details"CollapsedImage="~/Images/expand.jpg"CollapsedText="Show Details..."ExpandDirection="Vertical"SuppressPostBack="true"></cc1:CollapsiblePanelExtender>

<cc1:RoundedCornersExtenderID="RoundedCornersExtender1"runat="server"TargetControlID="Panel3"Radius="6"Corners="Top"></cc1:RoundedCornersExtender><cc1:RoundedCornersExtenderID="RoundedCornersExtender2"runat="server"TargetControlID="Panel4"Radius="6"Corners="Bottom"></cc1:RoundedCornersExtender>