Get index of checked items ?

2 posts, 1 answers
  1. George C.
    George C. avatar
    7 posts
    Member since:
    Sep 2018

    Posted 25 Jan Link to this post

    Greetings,

    How can I get index of checked items , put in lines of a string  ?

    Imagine I have checked the first , forth and sixth items , so I will have :

    1

    4

    6

     

     

     

  2. Answer
    Dess | Tech Support Engineer, Sr.
    Admin
    Dess | Tech Support Engineer, Sr.  avatar
    3195 posts

    Posted 28 Jan Link to this post

    Hello, George,      

    RadCheckedDropDownList stores all checked items in the CheckedItems collection. You can extract the index of each checked item by using the following approach:

    foreach (RadCheckedListDataItem item in this.radCheckedDropDownList1.CheckedItems)
    {
        Console.WriteLine(this.radCheckedDropDownList1.Items.IndexOf(item));
    }

    I hope this information helps. 

    Regards,
    Dess | Tech Support Engineer, Sr.
    Progress Telerik
    Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
Back to Top