Declined
Last Updated: 19 Oct 2023 08:22 by ADMIN
Anders
Created on: 12 Oct 2023 13:36
Category: DropDownTree
Type: Bug Report
0
How do i clear the Selected text / Selected value in a RadDropDownTree from Server side?

Hello,

 

I'm unsure whether this is an actual bug, but I can't seem to clear the selected text in the RadDropDownTree when i use UncheckAllNodes or UnselectAllNodes from the server side.

I try to to set SelectedText and SelectedValue on the RadDropDownTree control to string.Empty but neither works.

The nodes are unchecked though, but the text showing the previous selection is still visible after i  reload the page.

What should I do to also set the text to represent the selection done by UncheckAllNodes?

 

Kind regards,

Anders

2 comments
ADMIN
Attila Antal
Posted on: 19 Oct 2023 08:22

Hi Anders,

An issue is only considered to be a bug if the intended feature or behavior does not work as expected. Unlike the other common components (DropDownList, ComboBox, etc.) the DropDownTree works in a different way.

To remove the selection in the DropDownTree, you will have to clear the Entries. 

Example:

RadDropDownTree1.Entries.Clear();

I hope this will help resolve the issue.

Regards,
Attila Antal
Progress Telerik

Stay tuned by visiting our public roadmap and feedback portal pages! Or perhaps, if you are new to our Telerik family, check out our getting started resources
Anders
Posted on: 17 Oct 2023 12:07

This is what it looks like after i have called eaither of the tow methods

        rddCustomerGroupsFilter.EmbeddedTree.UncheckAllNodes();
        rddCustomerGroupsFilter.EmbeddedTree.UnselectAllNodes();

 

Although the boxes are unchecked there is still a text in the filter box that indicates that they are selected:

 

 

I have tried to set the SelectedText and the Selected value to an empty string, but it doesnt change anything

        rddProductFilter.SelectedText = string.Empty;
        rddProductFilter.SelectedValue = string.Empty;