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
125
igCombobox
posted

Hi,

I'd like to use the selected text, from an igniteUI checkbox-combobox, in my code behind.  How would I reference that?

Also, the combobox disappears from my default.aspx page, when I have runat="server" added,  ie.   <div id="cmbFullListOfTags" ****runat="server"*****></div>

I'm using ASP.NET Webforms, C#, and was following this example: http://www.igniteui.com/combo/filtering

////////Default.aspx////////

<div id="cmbFullListOfTags" runat="server"></div>
<script type="text/javascript"> var FullListOfTags  <%=myTagList%></script>
                <script type="text/javascript">
 
                    $(function () {
                        
                        $("#cmbFullListOfTags").igCombo({
                            width: "400px",
                            dataSource: FullListOfTags,
                            textKey: "Name",
                            valueKey: "Name",
                            multiSelection: "onWithCheckboxes",
                            filteringType: "local",
                            filterCondition: "contains",
                            renderMatchItems: "contains"
                        });
 
                    });
 
                </script>

////////Default.aspx.cs///////
string txtTagsToAddList;
txtTagsToAddList.Text = cmbFullListOfTags.ToString();

Parents
  • 17590
    Verified Answer
    Offline posted

    Hello John,

    Thank you for posting in our community.

    The combo control has MVC wrapper and there you can set data source on the server and retrieve combo value on the server. You can follow this  sample  for more information. It's important to use ComboFor() method that will render input, holding the igCombo value.

    But I see that you are using Web Forms and there you can use only the client-side igCombo. You need to create your own mechanism - if you want server-side data source, you should render it on the client as JSON or other format and then bind it to the igCombo. For getting the value you also should create some input that will be updated simultaneously with the igCombo and then send its value to the server.

    That's why for WebForms we have another bundle of controls - ASP.NET and there is a specific control for your needs - WebDropDown.

    Some additional information regarding WebDropDown as well as working samples could be found at:

    http://help.infragistics.com/doc/ASPNET/2014.1/CLR4.0/?page=Web_WebDropDown.html

    http://www.infragistics.com/products/aspnet/drop-down

    I hope you find my information helpful.

    Please let me know if I can provide you any further assistance with this matter.

     

     

Reply Children
No Data