C1ComboBox. What event returns selected value from c1combobox

Posted by: zbigniew.chojnowski on 5 November 2017, 6:55 am EST

    • Post Options:
    • Link

    Posted 5 November 2017, 6:55 am EST

    Hello, what is the event on a mouse C1ComboBox returns member value?

  • Posted 5 November 2017, 3:49 pm EST

    Hi,

    You can make use of the SelectedItemChanged and SelectedIndeChanged events of C1ComboBox that are fired when the selected item and the selected index changes, respectively. Please refer the below mentioned documentation links for the same:

    http://help.grapecity.com/componentone/NetHelp/c1input/C1.Win.C1Input.4~C1.Win.C1Input.C1ComboBox~SelectedItemChanged_EV.html

    http://help.grapecity.com/componentone/NetHelp/c1input/C1.Win.C1Input.4~C1.Win.C1Input.C1ComboBox~SelectedIndexChanged_EV.html

    Since these events are fired when selected value/index is changed each time, you can make use of the SelectedItem property of C1ComboBox in their related event handlers to do the needful for you.

    Let us know if you need further assistance.

    Best Regards,

    Esha

  • Posted 7 November 2017, 8:42 pm EST

    Thanks,

    Zbyszek

  • Posted 8 November 2017, 12:47 am EST

    hi,

    I have on one form two C1Combobox’s. For one c1Combobox works correctly and the other no.

    Zbyszek

  • Posted 8 November 2017, 3:16 pm EST

    Hello,

    The events work fine for multiple C1ComboBox instances as well. Please find the attached sample depicting the same. Modify the same as per your requirement.

    If you still face the issue, kindly share the modified sample showing the issue. This will help us assist you further.

    Best Regards,

    Esha

    C1Combobox Test.zip

  • Posted 9 November 2017, 3:44 am EST

    And how will it be when different ItemsDisplayMember = “” and ItemsValueMember = “” different

  • Posted 12 November 2017, 4:45 pm EST

    Hi,

    In the attached sample, if you change the ItemsDisplayMember and ItemsValueMember, the two C1ComboBox controls still work fine.

    
     c1ComboBox1.ItemsDisplayMember = "Patient";
                c1ComboBox1.ItemsValueMember = "Drug";
                c1ComboBox2.ItemsDisplayMember = "Drug";
                c1ComboBox2.ItemsValueMember = "Patient";
    
    

    Can you please elaborate on what you mean by different ItemsDisplayMember = “” and ItemsValueMember = “” different?

    We request you to share the modified sample showing the issue or the code snippet that you use.

    This will help us assist you further.

    Best Regards,

    Esha

  • Posted 12 January 2018, 1:09 am EST

    Hi,

    my code does not work. after clicking on C1cboRok displays system.collections.generic.list 1

    string sql = string.Format(“select lo.NUMER_ROKU, lo.NAZWA_ROKU from lata_obrotowe lo where lo.ID_FIRMY={0} order by lo.NUMER_ROKU”,1);

            PolaczenieZBaza db = new PolaczenieZBaza();
            List<List<string>> lata_obrotowe = new List<List<string>>(); // tutaj bedzie rezultat pobranych rekordow 
            lata_obrotowe = db.WykonajPolecenie(sql);
    
    
            c1cboRok.ItemsDataSource = lata_obrotowe;
            c1cboRok.ItemsDisplayMember = "NAZAWA_ROKU";
            c1cboRok.ItemsValueMember = "NUMER_ROKU";
    
  • Posted 14 January 2018, 9:31 pm EST

    Hi,

    Kindly refer the attached sample showing how to bind a C1ComboBox to a list. Let us know if you need further assistance.

    Regards,

    Esha

    ComboBoxBinding.zip

Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels