Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
105
WebDropDown MultiSelect Postback
posted

Hi,

we are using infragestics for our .net web developement, I have couple of issues with webdropdown. may be we are missing few settings, please guide us to fix issues. 

Version of WebDropDown: this in content page..
<%

@ Register assembly="Infragistics35.WebUI.WebCombo.v9.2, Version=9.2.20092.1003, Culture=neutral, PublicKeyToken=7dd5c3163f2cd0cb" namespace="Infragistics.WebUI.WebCombo" tagprefix="igcmbo"%>
 <asp:UpdatePanel ID="UpdatePanel1" runat="server" UpdateMode="Conditional">       
       <ContentTemplate>       
        <asp:PlaceHolder ID="ph3" runat="server" />
           <asp:Label ID="lbl123" runat="server" Text="" Font-Bold="True"
            ForeColor="#CC0000"></asp:Label>
        <asp:PlaceHolder ID="phSearchOptions" runat="server" /> <br /> <br />
     
        <asp:Button ID="btnAddSearch" runat="server" Text="AddMoreSearch" onclick="btnAddSearch_Click"/>
        <br />
        <br />
     <br />
     </ContentTemplate>
     </asp:UpdatePanel>

I am creating webdropdown with checkboxes(for multi select) dynamically and adding it to updatepanel control,

 Issue: 1  Postback is occuring for valuchange everything is ok but if user wants to select four choices from dropdown,  its getting postback for each selection, so ultimately user can select only one option at any point,  but I need postaback has to be happen once they finish all selections or atleast closing that dropdown values. see the below image for your reference.  After binding items to dropdown I am adding new item as --None-- for this also I am getting(you can see in the image) checkbox, generally it should not. here is the code for binding dropdown. sometimes styles are resetting they can see the checkbox and option but only as plain text is there any style I need to set everytime. because its an dynamic control it get created on every postback.

WebDropDown wdd = new WebDropDown();
wdd.DataSource = FilterSearchFields();
wdd.TextField = "SearchFieldName";
wdd.ValueField = "SearchFieldID";
wdd.DataBind();
wdd.Items.Insert(0, new DropDownItem("--None--", "-1"));
wdd.ID = dropDownID;
wdd.AutoPostBack = true;
wdd.SelectionChanged += new DropDownSelectionChangedEventHandler(wdd_SelectionChanged);
wdd.EnableMultipleSelection = true;
wdd.EnableClosingDropDownOnSelect = false;
AddPostbackTrigger(wdd.ID);

Issue: 2  Can I know the style which shows the below dropdown list  to length of its list. I have equalsto, contains   but the width of that box showing till its contents but I want to display till the width of dropdown, please let me know is there any style I need to set.

 

 Issue:3  I am adding new item to dropdown after binding list, first time I cant see that option but second time I can see that option in second dropdown but not in first dropdown. like I said theese are dynamic dropdowns, I am creating them in PreInit event.  initially there would be only one entry after user clicks on "AddMoreSeach" button then I am creating one more row with different controls. I am placing images for your reference.

see on this Image I can't see the '--None--' item.

 After use clicks on AddmoreSearch then I am adding second row like below, in second row I can see --None-- text . for bothe theese rows I am using same code becos theese are dynamic controls it uses same code for each n every row.

 

thanks in advance for your reply..