This is a migrated thread and some comments may be shown as answers.

Associating CheckedDropDownLists with each other

3 Answers 83 Views
CheckedDropDownList
This is a migrated thread and some comments may be shown as answers.
özer
Top achievements
Rank 2
Veteran
Iron
özer asked on 28 Dec 2020, 12:22 AM

Hi.

I have a problem that I could not solve somehow.

I have three CheckedDropDownLists, a button and a gridview.

My goal is to filter the data (List <SomeClass>) linked to the gridview with CheckedDropDownList elements.(I know Gridview has filtering feature and I already use it. But gridview's filtering feature hides data outside of the filter.)

I want to filter the list that I have connected to the Gridview as a data source according to the criteria I have selected with these three CheckedDropDownLists and link the newly created list to the GridView as a data source.

These are simple operations that have thousands of examples on the Internet, and I've already done so far here. 

The main problem is I can't make these three CheckedDropDownLists interactive with each other. When I make a selection on one, I want the other two updated accordingly.

If I have selected 4 company numbers from the CheckedDropDownList, which lists the company number values, the names of these four companies will appear in the CheckedDropDownList, which lists the company names. I want it to show the calculation ID values of these companies in the other CheckedDropDownList that lists the calculation Id values. It seems a little complicated, but I hope I could explain it.

3 Answers, 1 is accepted

Sort by
0
Dess | Tech Support Engineer, Principal
Telerik team
answered on 28 Dec 2020, 11:11 AM
Hello, özer,   

Regarding the 4 RadCheckedDropDownList controls, I suppose that you are trying to achieve the well known cascading combo boxes scenario. Thus, when the checked items in the companies list is changed, you can set another DataSource collection for the other RadCheckedDropDownList controls with the relevant records in that collection. The RadCheckedDropDownList.ItemCheckedChanged event is appropriate to detect when a new company is checked and then adjust the DataSource collection that is set to the rest of the affected RadCheckedDropDownList controls. I believe that this approach would fit your custom requirement.

As to the RadGridView and its filtering behavior, indeed, the rows that don't match the filter criteria get hidden. You can use the custom filtering functionality if you need to define some custom filtering criteria. Additional information is available here: https://docs.telerik.com/devtools/winforms/controls/gridview/filtering/custom-filtering 
The Demo application >> GridView >> Filtering >> Custom filtering example is quite useful on this topic.

The search functionality in RadGridView highlights the search results and keeps all rows visible: https://docs.telerik.com/devtools/winforms/controls/gridview/rows/search-row 

I hope this information helps. If you need any further assistance please don't hesitate to contact me. 

Regards,
Dess | Tech Support Engineer, Sr.
Progress Telerik

Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.

0
özer
Top achievements
Rank 2
Veteran
Iron
answered on 31 Dec 2020, 01:51 PM

Hello, Dess

Changing the data source of the other RadCheckedDropDownList in the ItemCheckedChanged event of one RadCheckedDropDownList fires the ItemCheckedChanged event of the second. They both enter endless loop until only one unchecked item remains.Instead of changing the data source, I changed the color and enabled properties of unrelated items. I have reached my goal, albeit partially.I tried to hide / show items by setting the height of the items to 0 and 20, but it was not what I thought.The isVisible feature hides the item, but there is space as much as its height, I searched for options such as collapse and expand, but could not find it.

0
Nadya | Tech Support Engineer
Telerik team
answered on 04 Jan 2021, 02:08 PM

Hello, özer,

It seems that you have a custom implementation if the ItemCheckedChanged event of one RadCheckedDropDownList triggers the event on another RadCheckedDropDownList. This is why you decide to format the items in the drop-down. Note, you can format and customize the look of the items in the drop-down in a way that is suitable for your case. For example, you can make them look as they are disabled, change their style, or also collapse them by using ElementVisibility.Collapsed in the VisualListItemFormatting event. However, the space reserved for the items would remain. The possible way to show fewer items than initially loaded is to rebind the RadCheckedDropDownList and shown the desired count of items. 

I hope this information helps. If you need further assistance do not hesitate to contact us.

Regards,
Nadya
Progress Telerik

Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.

Tags
CheckedDropDownList
Asked by
özer
Top achievements
Rank 2
Veteran
Iron
Answers by
Dess | Tech Support Engineer, Principal
Telerik team
özer
Top achievements
Rank 2
Veteran
Iron
Nadya | Tech Support Engineer
Telerik team
Share this question
or