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

Beta control?

36 Answers 224 Views
DropDownTree
This is a migrated thread and some comments may be shown as answers.
Jon
Top achievements
Rank 1
Jon asked on 06 Mar 2013, 08:31 AM
Hi,

Sorry for the contentious sounding title but is this control in fact a beta?  The reason I ask is that it seems as though a lot of critical functionality is missing from it.  Such as the ability to easily setup and access the selected values.

I'd like to drop on a form and know that I can bind to a database field that contains a comma delimited list of values that should be checked.  Nope, can't do that.  I don't want to have to have an army of supplementary routines that support something that should have been included in a control.

Please advise on a time frame for this basic functionality being added.

Apologies if this is easy and can already be done but from what I see it can't be yet for a form control the easy allocation of values to and from a control should surely be the #1 priority?

Regards

Jon

36 Answers, 1 is accepted

Sort by
0
Peter Filipov
Telerik team
answered on 06 Mar 2013, 09:35 AM
Hello Jon,

Could you please elaborate a bit on your case. In case that you want to bind the control to a list the structure of the embedded tree will be flat. Review the attachment.

In order to get the SelectedText you should iterate through the Entries collection and get the text of each entry. For the SP1 we are going to introduce Text property.

Kind regards,
Peter Filipov
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
0
Jon
Top achievements
Rank 1
answered on 06 Mar 2013, 11:16 AM
Hi Peter,

I can populate the control just fine and don't have an issue with that - it looks great.  But a control like this should have a SelectedValue tag.  In this case the selected value tag should be able to take a comma separated set of values to populate.

This when I use this on a formview it would be easy to save data to/from the database.  As it stand I and guessing that I'll need to use a couple of extra functions to assign data to and from the control.  Should be build in.

Also worth adding as a feature is a Check/Uncheck all function that would put an extra row at the top of the drop down so that all entries can easily be selected if necessary.

Note that my comments here apply to all variations of your drop down controls where there are checkboxes present.  

Regards,

Jon
0
Peter Filipov
Telerik team
answered on 06 Mar 2013, 12:45 PM
Hello Jon,

For the upcoming service pack we are going to introduce such properties - SelectedValue and SelectedText. Regarding to the CheckAll button it will be added for the major release with another cool features as filtering and keyboard support (in the following blog post we talking about them). Any kind of further suggestions are more than welcomed.

Regards,
Peter Filipov
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
0
Jon
Top achievements
Rank 1
answered on 06 Mar 2013, 12:51 PM
Thanks for the feedback Peter

Are those values going to cater for checkboxes with multiple values selected?   If so that will be fantastic.  I have so many places in my code where I have either combo drop downs with checkboxes or combo boxes with a tree (and sometimes checkboxes) , the JS for these is a royal pain in the butt so having one control that could bind to a selectedvalue in the db will be a major time saver.  

Any idea roughly when the SP is pencilled in for?

Regards

Jon





0
Peter Filipov
Telerik team
answered on 06 Mar 2013, 01:12 PM
Hello Jon,

The SelectedText/Value properties will cover single and multiple selection. When you have more then one entry the SelectedValue will return comma separated list of Entries' values, the SelectedText will return entries' text with the appropriate delimiter. 

Kind regards,
Peter Filipov
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
0
Erik
Top achievements
Rank 2
answered on 26 Mar 2013, 04:00 PM
Hello Jon and Petar,

Well.. I have to agree with Jon, it looks like it is not all finished at the bases. SelectedText / Value is now the first thing I ran in to when using it for 1 hour! :-) Also the layout (skins) are not all done. (Is known by Telerik, they are working on that; other thread.)

The "entries" collection however I cannot find. Also, I was expecting an "Items" property, like all the other controls have. I do not see any collection in code or design.

So, for now, how can I see witch node is selected, or set the selected node?

------------------------------------------------------------------------------------------------------------
Update: I've been using the hotfix 2013.1.326.40

There is a prop SelectedValue (and SelectedText) now, however: they are ReadOnly...
The Entries collection is now available, but why not call it "Items"?

There is also a prop "DefaultValue" (what has the wrong Intellisense description! copy/paste error from prop FullPathDelimiter I guess)
This property does not do anything I can see. 

So, how do we set the initial value?

update2: and there is no Click event!
update3: undocumented property "ItemType" 

Erik
0
Peter Filipov
Telerik team
answered on 28 Mar 2013, 11:44 AM
Hi Erik,

Thank you for reporting all of these issues. We are going to do our best to improve the control for the upcoming service pack.
Here is some info about what features you should expect.
SelectedText and SelectedValue properties will be exposed. They will be getters, because entries are created from existing nodes. In case that you want to create an entry at the server side you should handle the OnNodeDataBound event and invoke the CreateEntry method of the node. We had an issue with the Entries collection visibility in the intelisense which is already fixed. Regarding to the DefaultValue its description is updated, it should be used in scenarios with RequiredFieldValidators.
Regarding to the events here is a list with them.

Regards,
Peter Filipov
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
0
Erik
Top achievements
Rank 2
answered on 28 Mar 2013, 12:19 PM
Hello Peter,

Thank you for your feedback. My question remains: how do I set the initial value? I can now get the value (DataValueField / SelectedValue) but how do I get it to display a sub node? So, when the page appears on the client, I want the client to see that the Sub Node 1.3 is shown (SelectedText=Node1\Node3)

Also, I'm aware of the events, but still do not see the click event. I probably do not understand the thinking around "entries". EntryAdded is fired when I click an item (entry) and have autopostback=true. But Why? Why is it called EntryAdded? Because of the multi select? I do not add any entry, I click an item (entry if you must :-))

Erik
0
Jon
Top achievements
Rank 1
answered on 28 Mar 2013, 12:28 PM
Hi Peter,

I agree with Erik.  We need to be able to set the value.

I'm sick and tired of having to fudge controls by working with the OnNodeDataBound type
events.  We need to be able to use Bind in the ASP.Net code so that forms can be developed and maintained quickly.  At the moment I have to add so many little fudges into the data binding events that it really doesn't make for a very maintainable system.

As a control provider your holy grail should be in making the controls completely manageable from the ASP.Net code.  Yes I appreciate if 0.5% of people have a strange requirement then you shouldn't include it however almost every single user of this and similar controls will be using them in some type of form for data entry.  95% of those will be then editable.  As such maybe 90% of your users need and in my case demand, that the control be capable of taking a selectedvalue as per the combo box: ie:

SelectedValue='<%# Bind("IDsToSelect", "{0}") %>'

I honestly feel that without that this control is pointless.

Regards

Jon
0
Erik
Top achievements
Rank 2
answered on 28 Mar 2013, 12:40 PM
I agree Jon. The controls all start with RAD.

Erik
0
Peter Filipov
Telerik team
answered on 01 Apr 2013, 02:59 PM
Hello guys,

We are trying to gather as much as possible feedback about the RadDropDownTree control and implement it in the most convenient way to use. As a result of it could you please give me your ideas regarding to the following cases:

In case that you want to set the SelectedText to value which
1) does not exist in the embedded tree nodes' texts what should happen:
   1.1) no of the nodes are selected and the text is rendered in the entry area. When the user selects a node the text is changed. What should happen if the user wants to set the control text to its initial text (there is no node with the initial text) ?
   1.2.) nothing should be rendered and the user should select from the embedded tree nodes

2) does exists in the embedded tree nodes' text what should happen:
   2.1) the node(s) should be selected(checked)
   2.2.) the node(s) should not be selected(checked). When a node is selected the text is changed

Regards,
Peter Filipov
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
0
Erik
Top achievements
Rank 2
answered on 02 Apr 2013, 09:36 AM
Hello Peter,

First: I think you should mimic the RadCombobox or radDropDownlist as much as possible. I'm working with Telerik controls for years, so it should be intuitive model for me than.

Personally I never use the SelectedText to set the controls; I always use SelectedValue, even if it is only text, I fill the Value coll with text also. 

But when you set a The Selected Text to a value that does not exist, the control should show empty (or defaultTextValue like "(please select)"?) SelectedIndex should be -1. That's how you can see there is no item selected.

And I think you should go for 2.1

Erik
0
Jon
Top achievements
Rank 1
answered on 02 Apr 2013, 11:32 AM
Hi Peter,

I agree with Erik.  SelectedText is never really useful and is potentially a serious overhead (string comparison via number comparison).

Copy the radcombobox mechanisms as Erik said...  Best approach,

Definitely 2.1, the checked list should be applied....

Oh and if you could add in some code to make this and radcomboboxes relational with no extra code then I'd love telerik forever!

Regards

Jon

0
Peter Filipov
Telerik team
answered on 05 Apr 2013, 09:15 AM
Hello,

Thank you for your feedback. We are going to consider your suggestion and do our best to implement it in the most suitable way for the developers which are using the control.

Regards,
Peter Filipov
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
0
Jon
Top achievements
Rank 1
answered on 05 Apr 2013, 09:18 AM
Hi Peter,

Sounds good but frankly given the importance of this change I'd say make it a breaking change if necessary.  

I'd be amazed if anyone is using this control because of it's current issues.

The number of times that my code has been hit by breaking changes that have been pointless I think that this would be a refreshing breaking change!

I'll reiterate that without this functionality you may as well remove this control from the suite as it's a red herring.

Regards

Jon
0
Erik
Top achievements
Rank 2
answered on 06 Apr 2013, 01:30 PM
Hi Peter,

I do have a other remark. When you have radCombo or radDropDownList en you press the drop button and then select an item, the dropDown closes. This is not happening with radDropDownTree. This unlogical behaviour for a user (and me :-) ) Now you have to click on the box or outside the dropDownList to get it to select the item and close.

I do understand that the tree works different because you can expand/collapse items, but when ExpandNodeOnSingleClick="False" I expect the list to close and the item to be selected. Or make it a option NodeSingleClick="Expand | Select | Nothing".

Erik
0
Peter Filipov
Telerik team
answered on 08 Apr 2013, 08:46 AM
Hello guys,

@Jon
The control was designed based on our customers' feedback and for our internal needs. Since we improved the control in the service pack we had really positive feedback and the users showed to us variety of use cases where the control saved their time to resolve different issues. We are currently working very hard on the controls improvement in order to satisfy more and more customers' requirements.

@Erik
The feature that you described is already in our product backlog. We had some experience with similar controls and it was really irritating for us that the drop down was closing every time we selected an item and the expand expand of an item was only on the plus button (not on single or double click). That is why we decided that the drop down should be closed only when the user clicks on the document or the control itself.

Kind regards,
Peter Filipov
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
0
Jon
Top achievements
Rank 1
answered on 08 Apr 2013, 08:52 AM
Hi Peter,

Sorry I'm not meaning to sound rude or anything but I can't understand how the control would be useful to anything more than a few contrived scenarios.  Yes it looks good and works well but without the ability to select/extract selection data in any simple format the whole thing loses a fairly large set of potential users.

How do you go about getting onto the panels for this kind of thing?  My use of the controls is very extensive and I know of dozens of areas where the usability could be improved to make controls look better and also to make them simpler to program.

Re the comment that Erik raised, I can see it both ways - both of which are relevant, could a boolean flag be put in place to make it work the same as other controls?

Regards

Jon
0
TIOS
Top achievements
Rank 1
answered on 09 Apr 2013, 10:40 AM
For this to be useful to me I need todo the following:

I have a open access datasource on the page that is bound to a combo box.  I want to replace this with a RadDropdownTree, that part's nice and easy got the data coming in nicely.  However, when you then want to set the where clause up on the openaccessdatasource it just doesnt recognise it. In the ODS wizard if I hit Filter choose a field to filter by set == set source to control and the control id doesnt even appear in the list (want to use SelectedValue from RadDrowndownTree).

So I flipped it on the head and tried another way but even that doesnt work as the WhereParameters.Add fail to add. Sample code (on rddtCategory_EntryAdded event):
OpenAccessDataSource odsP = new OpenAccessDataSource();
odsP.ObjectContextProvider = "MyORMLibrary.ChocolateGourmetDbContext, MyORMLibrary";
odsP.OrderBy = "Order, Name";
odsP.TypeName = "MyORMLibrary.Product";
odsP.Where = "CategoryId == @CategoryId";
Guid gV = new Guid(e.Entry.Value);
odsP.WhereParameters.Add("CategoryId", typeof(string), gV.ToString());
rg.DataSource = odsP;


It would be a lot nicer to do it the simple was as then im getting the benefits of clean code using the ods wizard as the control is on the page regardless.
0
Peter Filipov
Telerik team
answered on 11 Apr 2013, 08:39 AM
Hi,

@Jon
It seems that functionality will be useful and we are going to introduce such.

@Chris
Is it possible to open a new support ticket and send me a runnable sample to review it, because I am not quite sure about your code and use case.

Regards,
Peter Filipov
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
0
Jon
Top achievements
Rank 1
answered on 11 Apr 2013, 08:59 AM
Hi Peter,

Many thanks - look forward to seeing it as it will simplify a lot of pages!

Regards

Jon
0
Jon
Top achievements
Rank 1
answered on 11 Apr 2013, 12:21 PM
Hi Peter,

Just having a look at the SP1 version and see that the SelectedValue get is now working.  Until the setter is working is there a way to set the checked values in JS or will I need to use the node data bound event in the code behind?

I'm just thinking that if there is a simple way to do it in JS I could do a temporary work around for now....

Regards,

Jon
0
Peter Filipov
Telerik team
answered on 12 Apr 2013, 10:07 AM
Hello Jon,

For now, the only way to preselect a node and add an entry is to use node data bound event. Unfortunately it is not possible to use JS to workaround the issue.

Regards,
Peter Filipov
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
0
Jon
Top achievements
Rank 1
answered on 12 Apr 2013, 10:10 AM
Hi Peter,

I was trying the codebehind approach yesterday but it didn't seem to work.  Do you happen to have a link to an example please?  

Many thanks,

Jon
0
Peter Filipov
Telerik team
answered on 12 Apr 2013, 11:32 AM
Hi Jon,

Please review the following help article. In case that you have some difficulties please open a new support ticket and send me a runnable project for a local investigation.

Regards,
Peter Filipov
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
0
Jon
Top achievements
Rank 1
answered on 12 Apr 2013, 11:42 AM
Hi Peter,

Yes sorry I wanted the TriState checkboxes as I wanted the visual indication of at least one child element being ticked....

I guess that it's one of the other modes or nothing for now?

I take it that when the SelectedValue setter is introduced it will allow for tristate mode?

Regards

Jon
0
Peter Filipov
Telerik team
answered on 17 Apr 2013, 07:31 AM
Hello Jon,

As soon as we implemente that features we are going to inform you.

Regards,
Peter Filipov
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
0
Jon
Top achievements
Rank 1
answered on 17 Apr 2013, 07:56 AM
Hi Peter,

Really looking forward to getting some of the older combos with tree lists in them removed.

I've now got a fudge going in the database that turns my geographic structure into a hierarchical tree ready for use in this :)

Regards

Jon
0
Trustteam
Top achievements
Rank 2
answered on 02 May 2013, 02:56 PM
Agree, should never have been released.
0
Erik
Top achievements
Rank 2
answered on 21 May 2013, 01:01 PM
Hello Peter Filipov,

Any progress on the SelectedValue? I do not see it in any build. In my version 417 the SelectedValue is still ReadOnly and the only way to select an item on loading is to use the NodeDataBound event. Pretty ugly. My application is growing and I rather not have to replace 10ths of pieces of code later-on...

Kind regards,

Erik
0
Peter Filipov
Telerik team
answered on 21 May 2013, 02:00 PM
Hi Erik,

Till the end of the week we are going to release the Beta version of the Q2.2013. The desired functionality is already implemented and it will be included.

Regards,
Peter Filipov
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
0
Erik
Top achievements
Rank 2
answered on 17 Jun 2013, 10:54 AM
Hi Peter,

The Q2 version does solve the SelectedValue problem. But a small issue has now arisen:

When using the selectedValue property, the FullPathDelimiter property is ignored. 

<telerik:RadDropDownTree ID="RadDropDownTree_Accounts" AutoPostBack="False" DataTextField="Name" DataFieldID="AccountId" DataFieldParentID="ParentAccountId" DataValueField="AccountId" Width="250px" DefaultMessage="(Please select...)" ExpandNodeOnSingleClick="true" TextMode="FullPath" FullPathDelimiter=" » " runat="server">
    <DropDownSettings Width="250px" Height="200px" />
</telerik:RadDropDownTree>

OLD code (working fine, but somewhat complex):

Private Sub SetAccountsDataSource(Optional ByVal abln_RefreshStoredData As Boolean = False)
    If HttpContext.Current.User.Identity.IsAuthenticated Then ' when logged in
        Dim mlst_Accounts As List(Of Data.Entities.App.Std.Account) = GetAccountsDataSource()
 
        With CType(HeaderPane.FindControl("RadDropDownTree_Accounts"), RadDropDownTree)
            .DataSource = mlst_Accounts
            .DataBind()
            .ExpandAllDropDownNodes()
        End With
    End If
End Sub
Private Sub RadDropDownTree_Accounts_NodeDataBound(sender As Object, e As Telerik.Web.UI.DropDownTreeNodeDataBoundEventArguments) Handles RadDropDownTree_Accounts.NodeDataBound
    Try
        If e.DropDownTreeNode.Value = Core.Session.AccountId Then e.DropDownTreeNode.CreateEntry()
    Catch ex As Exception
        If Diagnostics.Debugger.IsAttached Then Diagnostics.Debugger.Break()
    End Try
End Sub

New Code (showing / in stead of " » "
Private Sub SetAccountsDataSource(Optional ByVal abln_RefreshStoredData As Boolean = False)
    If HttpContext.Current.User.Identity.IsAuthenticated Then ' when logged in
        Dim mlst_Accounts As List(Of Data.Entities.App.Std.Account) = GetAccountsDataSource()
        With CType(HeaderPane.FindControl("RadDropDownTree_Accounts"), RadDropDownTree)
            .DataSource = mlst_Accounts
            .DataBind()
            .ExpandAllDropDownNodes()
            .SelectedValue = Core.Session.AccountId.ToString
        End With
    End If
End Sub

Erik
0
Peter Filipov
Telerik team
answered on 19 Jun 2013, 12:48 PM
Hi Erik,

I am writing you to confirm that I replicated the issue at my side. The problem is logged in our tracking system and it is going to be fixed. In a way of gratitude I updated your telerik points.

Regards,
Peter Filipov
Telerik
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to the blog feed now.
0
Erik
Top achievements
Rank 2
answered on 21 Aug 2013, 02:25 PM
--------------------------------------
Issue's resolved on my side.
--------------------------------------
0
Erik
Top achievements
Rank 2
answered on 21 Aug 2013, 02:47 PM
But... (there always is... :-) )

Now, I have the tree, the selectedValue is working, but how can I make it so, that the selected sub item is visible? If it's parent is collapsed, you cannot see it is selected, except for the dropdownbox when you use full path. I tried to use the NodeDataBound event, you can use e.DropDownTreeNode.Expanded = True, but it does not do anything. Any parent objects are not in scope to expand them.

So, any ideas about this? (expect ExpandAllNodes...)

Erik
0
Peter Filipov
Telerik team
answered on 26 Aug 2013, 07:22 AM
Hi Erik,

I have tested the described issue with the latest version of our controls and everything is working fine. Could check for a condition in your code in the NodeDataBound handler? You could access the embedded tree and manipulate the nodes directly.


Regards,
Peter Filipov
Telerik
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to the blog feed now.
Tags
DropDownTree
Asked by
Jon
Top achievements
Rank 1
Answers by
Peter Filipov
Telerik team
Jon
Top achievements
Rank 1
Erik
Top achievements
Rank 2
TIOS
Top achievements
Rank 1
Trustteam
Top achievements
Rank 2
Share this question
or