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

Show/Hide RadGrid using RadButton

4 Answers 138 Views
Buttons
This is a migrated thread and some comments may be shown as answers.
Yana
Top achievements
Rank 1
Yana asked on 17 Aug 2011, 02:31 AM
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

4 Answers, 1 is accepted

Sort by
0
Petar Mladenov
Telerik team
answered on 19 Aug 2011, 01:08 PM
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 >>

0
Ben
Top achievements
Rank 1
answered on 16 Dec 2014, 06:22 PM
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.
 



0
Petar Mladenov
Telerik team
answered on 17 Dec 2014, 08:14 AM
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.

 
0
Ben
Top achievements
Rank 1
answered on 18 Dec 2014, 06:05 PM
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.
Tags
Buttons
Asked by
Yana
Top achievements
Rank 1
Answers by
Petar Mladenov
Telerik team
Ben
Top achievements
Rank 1
Share this question
or