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

Get a handle to the toolbar buttons on the server side

2 Answers 60 Views
ToolBar
This is a migrated thread and some comments may be shown as answers.
Monsi Lache
Top achievements
Rank 1
Monsi Lache asked on 17 Apr 2010, 09:37 AM
Hi there,

I know this is simple for most of you out there, I have faith to get help.

I've designed a toolbar at design time with the following buttons:

Group ALL: with the following buttons
All

Groupt Status: with the following buttons
Open
Completed
Cancelled

I also want the following functionality:
1) When the button 'All' is checked, the buttons 'Open','Completed' and 'Cancelled' to be unchecked.
2) When any of the buttons in the 'Status' group is checked, the 'All' button to be unchecked.

Further more I want to get a handle of all 4 buttons and their checked states(bool) on the server-side(default.aspx.cs) so that I can pass true/false to the database to filter out results based on the checked states of the buttons. Please help. Here is a snippet of my design code(default.aspx):

 

 

 

 

2 Answers, 1 is accepted

Sort by
0
Yana
Telerik team
answered on 19 Apr 2010, 12:59 PM
Hello Monsi Lache,

You can achieve the first with client-side code - just subscribe to OnClientCheckedStateChanged event of the toolbar and and uncheck the needed buttons using their client-side API (check() and uncheck() methods), note that you should use trackChanges() and commitChanges() methods of the toolbar in order to preserve their state on the server as it's shown here.

Regarding second question, you can use Checked property of the button to get their state.

Greetings,
Yana
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.
0
Monsi Lache
Top achievements
Rank 1
answered on 02 Nov 2010, 01:25 AM
Thanks Yana, I used client side's

OnClientButtonClicked

event and some javascript coding and things look good! Appreciated.
Tags
ToolBar
Asked by
Monsi Lache
Top achievements
Rank 1
Answers by
Yana
Telerik team
Monsi Lache
Top achievements
Rank 1
Share this question
or