I'm migrating form 2007 Q2 release to 2008 Q3 release.
I have an scenario with different RadToolBarButtons that I control what of them I want to show and what of them I want to hide, depending of some parameter values.
In the previous version I could refer the buttons using myToolBar.Items.GetButtonByCommandName("myCommandName"). What I have to do right now?
I have an scenario with different RadToolBarButtons that I control what of them I want to show and what of them I want to hide, depending of some parameter values.
In the previous version I could refer the buttons using myToolBar.Items.GetButtonByCommandName("myCommandName"). What I have to do right now?
4 Answers, 1 is accepted
0
Accepted
Hi El,
You should use FindButtonByCommandName method of RadToolBar like this:
Greetings,
Yana
the Telerik team
Check out Telerik Trainer, the state of the art learning tool for Telerik products.
You should use FindButtonByCommandName method of RadToolBar like this:
RadToolBarButton btn = (RadToolBarButton) myToolBar.FindButtonByCommandName(name); |
Greetings,
Yana
the Telerik team
Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0

Jesús
Top achievements
Rank 1
answered on 09 Dec 2008, 03:16 PM
Perfect.
Thanks.
Thanks.
0

Hugo Augusto
Top achievements
Rank 2
Iron
Veteran
Iron
answered on 11 Sep 2010, 12:53 AM
Just want to warn that this information should be on the "Migrating From RadToolBar ASP.NET to ASP.NET AJAX" chapter of the manual. I don't really understand why you choose this way of accessing Items.
If you need to change some properties on some amount of buttons, using the new method
RadToolBarButton btn = (RadToolBarButton) myToolBar.FindButtonByCommandName(name);
over the old one
myToolBar.Items.GetButtonByCommandName("myCommandName").property = ...
is really turning things more difficult don't you think? The curious thing is that some of the properties are there when using myToolBar.FindButtonByCommandName(name).property, but unfortunately, enabled property isn't.
If you need to change some properties on some amount of buttons, using the new method
RadToolBarButton btn = (RadToolBarButton) myToolBar.FindButtonByCommandName(name);
over the old one
myToolBar.Items.GetButtonByCommandName("myCommandName").property = ...
is really turning things more difficult don't you think? The curious thing is that some of the properties are there when using myToolBar.FindButtonByCommandName(name).property, but unfortunately, enabled property isn't.
0
Hi Hugo,
Thanks for your feedback. We will review the "Migrating From RadToolBar ASP.NET to ASP.NET AJAX" chapter and update it accordingly.
Greetings,
Peter
the Telerik team
Thanks for your feedback. We will review the "Migrating From RadToolBar ASP.NET to ASP.NET AJAX" chapter and update it accordingly.
Greetings,
Peter
the Telerik team
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 Public Issue Tracking system and vote to affect the priority of the items