.checked = true not working

4 posts, 0 answers
  1. Dennis
    Dennis avatar
    13 posts
    Member since:
    Jul 2015

    Posted 30 Nov 2015 Link to this post

     HI Community

     

    I have a radcombobox with checkboxes. i like check all items bases on an ; delemited string. 

    i'm looping an array and if i find the value i set the checked option to true. 

    when i debug the code im getting to the part where i the checked = true ..... but when i open the box the value is not checked

     

    any suggestions why it happens ? 

    thanks 

    Dennis 

     

                    foreach (string Fund in aFunds)
                    {


                        if (cbFunds.FindItemIndexByText(Fund) != -1)
                        {

                            cbFunds.FindItemByText(Fund).Checked = true;

                        }


                    }

  2. Dennis
    Dennis avatar
    13 posts
    Member since:
    Jul 2015

    Posted 30 Nov 2015 in reply to Dennis Link to this post

    i'm using version 2015.3.930.40 
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Dennis
    Dennis avatar
    13 posts
    Member since:
    Jul 2015

    Posted 30 Nov 2015 Link to this post

    it is solved ..... it was not working with the OnTextChanged Event ..... i added a button which starts the process to parse the textbox and check all found items in the combobox
  5. Eyup
    Admin
    Eyup avatar
    3015 posts

    Posted 03 Dec 2015 Link to this post

    Hi Dennis,

    You can further optimize your code by applying the following modification:
    RadComboBoxItem item = RadComboBox1.FindItemByText("Success");
    if (item != null)
    {
        item.Text = "dsad";
    }

    Hope this helps.

    Regards,
    Eyup
    Telerik
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Back to Top