Show/Hide RadGrid using RadButton

5 posts, 0 answers
  1. Yana
    Yana avatar
    32 posts
    Member since:
    Aug 2011

    Posted 16 Aug 2011 Link to this post

    Howdy Everyone,

    I'd like to ask on how to hide/show telerik grids on the same window by clicking a button?

    Here's my scenario: 
    I have 3 buttons: the day, week and month. My default grid on the window is the Day Grid. When I clicked on the day button, the day grid would show up, when the week button is clicked, the week grid will and the day grid will hide, and lastly, when the month button is clicked, the month grid will show and the week grid will be hidden. Please help me since i'm new to your tools. Would greatly appreciate your help. God bless.

    Ayana
  2. Petar Mladenov
    Admin
    Petar Mladenov avatar
    2891 posts

    Posted 19 Aug 2011 Link to this post

    Hello Yana,

     As I managed to understand, only one of the three Grids will be visible at the same time corresponding to only one pressed button from the three Buttons. If so, the usual approach is to have 3 RadRadioButtons in a Group ( so that only one of the three will be pressed) and 3 Grids located in one parent grid. Every Grid's Visibilty could be bound to the IsChecked property of the corresponding button via Converter. The Converter simply transfers true to Visible and false to Collapsed. Let us know if you need further assistance on this.

    Kind regards,
    Petar Mladenov
    the Telerik team

    Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get now >>

  3. UI for WPF is Visual Studio 2017 Ready
  4. Ben
    Ben avatar
    10 posts
    Member since:
    Dec 2014

    Posted 16 Dec 2014 in reply to Petar Mladenov Link to this post

    Petar, I was hearing Yana ask how to show/hid grids and gave background into what she is doing.

    I heard part of your response to include nesting radgrids.

    I have a simular scenario as Yana.

    My problem is when I click a button and set a populated datatable to radgrid.datasource, the grid does not bind. It doesn't bind when I tell the grid to databind either. Do I need to "nest" datagrids to get this to work? Why are you telling her to nest the grids? I don't want nested grids.
     



  5. Petar Mladenov
    Admin
    Petar Mladenov avatar
    2891 posts

    Posted 17 Dec 2014 Link to this post

    Hi Ben,

    My advice was not to nest a Grids but to place them on top of each other and play with their visibility.
    As I managed to understand your issues are related to databinding GridViews. Is it possible for you to open a new support thread with more details about your specific scenario. This way we would be better able to advice you.

    Regards,
    Petar Mladenov
    Telerik
     

    Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

     
  6. Ben
    Ben avatar
    10 posts
    Member since:
    Dec 2014

    Posted 18 Dec 2014 in reply to Petar Mladenov Link to this post

    I think your post to Yana was either clarified or I read something that didn't exist.

    The problem I had as you may know was from a mistake I made databinding. by moving away from the SqlDatasource control to a manual approach the problem was resolved.
Back to Top
UI for WPF is Visual Studio 2017 Ready