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

RadToolbarDropDown selected value

14 Answers 243 Views
ToolBar
This is a migrated thread and some comments may be shown as answers.
Alexander
Top achievements
Rank 1
Alexander asked on 10 Dec 2008, 11:16 AM
Hi.

I'm trying to figure out which value has been selected in a drop down, but I'm getting nowhere...

My toolbar looks something like this:

<telerik:RadToolBar ID="Toolbar" runat="server" OnButtonClick="ToolBar_ButtonClick"
    <Items> 
        <telerik:RadToolBarDropDown Text="Z" ToolTip="Z"> 
            <Buttons> 
                <telerik:RadToolBarButton Value="A" Text="A" /> 
                <telerik:RadToolBarButton Value="B" Text="B" /> 
                <telerik:RadToolBarButton Value="C" Text="C" /> 
            </Buttons> 
        </telerik:RadToolBarDropDown> 
        <telerik:RadToolBarDropDown Text="Y" ToolTip="Y"
            <Buttons> 
                ... 
            </Buttons> 
        </telerik:RadToolBarDropDown> 
        <telerik:RadToolBarDropDown Text="X" ToolTip="X"
            <Buttons> 
                ... 
            </Buttons> 
        </telerik:RadToolBarDropDown>
</telerik:RadToolBar>

Getting at the dropdown was hard enough, the only method I found was the Toolbar.FindItemByText("Z") method, which uses a rather volatile property, Text, which is prone to change and/or be internationalized and stop working. Regardless, I got my hands on the RadToolbarDropDown. But then I was stuck. I could not find any "SelectedValue" (or relevant method on the DropDown. And, if iterating through its buttons, I couldn't find any indication on them which one is the selected one. So... what do I do?

14 Answers, 1 is accepted

Sort by
0
Yana
Telerik team
answered on 10 Dec 2008, 02:52 PM
Hi Alexander,

RadToolBarDropDown doesn't have selected value, it just exposes a collection of buttons. I suggest you use Templates to achieve the needed functionality. 

 

Greetings,

Yana
the Telerik team

 


Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
Peter Zolja
Top achievements
Rank 1
answered on 18 Dec 2008, 04:19 AM
So what's the point of a RadToolBarDropDown then? (BTW: the documentation is lacking quite a bit for the RadToolBar)
0
Yana
Telerik team
answered on 18 Dec 2008, 02:57 PM
Hello Peter,

RadToolBarDropDown just contains a collection of buttons in its dropdown which can be clicked and some client- and server-side code executed.

Greetings,
Yana
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
Peter Zolja
Top achievements
Rank 1
answered on 18 Dec 2008, 04:29 PM
I love that sentence, it's short and explains the purpose and also the limitation of the feature. I'd put that in the documentation, it would save us quite some time. Thanks.
0
Albert Shenker
Top achievements
Rank 1
Veteran
Iron
answered on 23 May 2013, 01:11 PM
I have to agree with Peter on this one. It would be nice to be able to apply a "Value" property to a toolbar dropdown, if only so we can use the FindByValue method of the toolbar to get access to the dropdown. I would like to disable the entire dropdown in certain instances... not just individual items in the drop down. Sure, I can use findbyText or perhaps use an index to locate the dropdown, but these methods are very fragile since button texts are often changed and buttons are constantly re-arranged. Anyhow, I don't really see any technical reason why the toolbardropdown doesn't have a "Value" property. Perhaps Telerik can enlighten me if there is one. Nevertheless, even if there is one, there needs to be a way of getting access to all toolbar items in some way which is not dependant on the button text or location. "Value" is used for most button items. If that can't be used for all, there needs to be some other property which has an associated FindBy... method. I realize this is a small issue, but its the sort of oversight which is really annoying to developers.
0
Kate
Telerik team
answered on 28 May 2013, 01:35 PM
Hi Albert,

Thank you for your feedback. I forwarded your request to our development team so they can consider it for future implementation. I also logged your request in our system so you can keep track and vote for it by  following the link below:
http://feedback.telerik.com/Project/108/Feedback/Details/49555-implement-value-and-finddropdownbyvalue-property-for-the-radtoolbardropdown
 
Regards,
Kate
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 their blog feed now.
0
Albert Shenker
Top achievements
Rank 1
Veteran
Iron
answered on 28 May 2013, 02:09 PM
Thanks for the reply and thank you for alerting your development team. I hope you do not make all of your development decisions based on "popularity", though. I realize that often times you need to prioritize in order to choose what to work on and what not to. However, some development decisions need to be made on their merits rather than on how many people happen to stumble upon them in your feedback system and/or have the time to consider them. The ability to get access to all toolbar items which is not susceptible to common breaking changes is not a "feature". In my opinion, the lack of this functionality is an oversight. I can't think of a single reason why any developer would disagree with this. Now, maybe there are some good and valid reasons why such functionality was not included in the original control. But if Telerik is going to wait till some magical consensus is reached via your feedback site in order to fix these sorts of glairing oversights, I'm afraid all it will do is lead to more frustration from developers like me, and I assume, Peter. 
0
Kate
Telerik team
answered on 31 May 2013, 10:59 AM
Hello Albert,

Thank you for your feedback.

In general the issues and the requests that we log in our system are being reviewed often. They are not rated only by the votes that are collected or the "popularity" of the feature but also depending on the functionality that they offer for the control. Although, I can not provide you with a specific time frame when the functionality will be implemented if we decide to include it in the improvements of the RadToolBar control I will increase its priority so that it can be reviewed earlier. Meanwhile can you please clarify if need to have both getter and setter when you need to use the Value property?

Regards,
Kate
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 their blog feed now.
0
Albert Shenker
Top achievements
Rank 1
Veteran
Iron
answered on 31 May 2013, 11:30 AM
In my typical use cases, I would set this property in the toolbar declaration and then use it server side to obtain the dropdown list object. However, I don't see why there should be a restriction on setting it in code-behind as well.. say if you dynamically create the toolbar items in one method and need to reference them in another.
0
Kate
Telerik team
answered on 03 Jun 2013, 11:05 AM
Hello Albert,

Thank you for the clarifications that you provided. We will take this into consideration when we are reviewing the requested feature of the RadToolBar control. Do not hesitate to let us know if you have any other suggestions of questions.  

Regards,
Kate
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 their blog feed now.
0
Josh
Top achievements
Rank 1
answered on 20 Apr 2015, 05:21 PM

It's been TWO YEARS since this post, AND this was an approved requests based on this:  http://feedback.telerik.com/Project/108/Feedback/Details/49555-implement-value-and-finddropdownbyvalue-property-for-the-radtoolbardropdown

Why has this function not yet been implemented?

Does Telerik even listen to its customers any longer?

0
Nencho
Telerik team
answered on 23 Apr 2015, 09:52 AM
Hello Justin,

I have increased the priority of the feature request and it is currently under consideration and implementation. I cannot provide you with an exact time frame for the feature release, but it will be implemented as soon as possible.

Regards,
Nencho
Telerik
 

See What's Next in App Development. Register for TelerikNEXT.

 
0
Albert Shenker
Top achievements
Rank 1
Veteran
Iron
answered on 22 May 2015, 03:53 PM
Its been 7 years since this issue was brought to Telerik's attention, and two years since they got around to approving it. And still, no fix for something which was clearly an oversight to begin with. Very frustrating. It's clear that the Asp.net AJAX product has taken a significant back seat as far as resource priorities at Telerik. At what point should I plan on abandoning the Asp.Net Ajax product? I'd like to time it with Telerik's plan on doing so.
0
Rumen
Telerik team
answered on 25 May 2015, 01:57 PM
Hi Al,

We will try to implement the "Value and FindDropDownByValue property for the RadToolBarDropDown" feature for Q3 2015.

If you have any other suggestions, you can always send me an e-mail.


Best regards,
Rumen Jekov
Product Manager, 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
Tags
ToolBar
Asked by
Alexander
Top achievements
Rank 1
Answers by
Yana
Telerik team
Peter Zolja
Top achievements
Rank 1
Albert Shenker
Top achievements
Rank 1
Veteran
Iron
Kate
Telerik team
Josh
Top achievements
Rank 1
Nencho
Telerik team
Rumen
Telerik team
Share this question
or