Get a handle to the toolbar buttons on the server side

3 posts, 0 answers
  1. Monsi Lache
    Monsi Lache avatar
    10 posts
    Member since:
    Oct 2012

    Posted 17 Apr 2010 Link to this post

    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

    Groupt Status: with the following buttons

    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. Yana
    Yana avatar
    4994 posts

    Posted 19 Apr 2010 Link to this post

    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.

    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.
  3. Monsi Lache
    Monsi Lache avatar
    10 posts
    Member since:
    Oct 2012

    Posted 01 Nov 2010 Link to this post

    Thanks Yana, I used client side's


    event and some javascript coding and things look good! Appreciated.
Back to Top