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

show/hide grids

1 Answer 103 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Keith Stephens
Top achievements
Rank 1
Keith Stephens asked on 16 Mar 2011, 01:37 PM
Hello,

Attached is a screen shot of my page.
But what I am wanting to do, and I have not been able to do so.
Is when the user select a node from the treeview I want to display the appropriate grid.
For each node there is a new grid, and depending on which node they choose I want to show that grid, and hide the others.

I have each grid in a RadAjaxPanel, and I have tried setting visiblity to true and false for the panel, and or the grids but it does not seem to work.
I have also tried a snippet of code I found on these forums, but that too does not work for me.
 if (RadGridOSPProposal.Style["display"] != null && RadGridOSPProposal.Style["display"].ToString() == "none")
                    RadGridOSPProposal.Style["display"] = "";
                else
                    RadGridOSPProposal.Style.Add("display""none");  

Thanks for any help, code samples are alway welcome.
KS

1 Answer, 1 is accepted

Sort by
0
Accepted
Marin
Telerik team
answered on 18 Mar 2011, 04:12 PM
Hello Keith,

I have prepared a sample page demonstrating the desired functionality. Have a look at it and see how it works in your case. Also that when you have multiple controls on the page updating each other it is recommended to use RadAjaxManager instead. Also it is better to use the RadGrid's Visible property instead of directly setting it through the style.

Best wishes,
Marin
the Telerik team
Tags
Grid
Asked by
Keith Stephens
Top achievements
Rank 1
Answers by
Marin
Telerik team
Share this question
or