4 Answers, 1 is accepted
0

Shinu
Top achievements
Rank 2
answered on 22 Nov 2010, 07:06 AM
Hello,
The following code will help you to toggle the GroupPanel visibility from client side.
JavaScript:
-Shinu.
The following code will help you to toggle the GroupPanel visibility from client side.
JavaScript:
<script type=
"text/javascript"
>
function
showHide() {
var
grid = $find(
"<%= RadGrid1.ClientID%>"
);
grid._groupPanel.set_visible(!grid._groupPanel.get_visible());
}
</script>
-Shinu.
0

dmw
Top achievements
Rank 1
answered on 22 Nov 2010, 11:12 AM
Thanks, there seems to be a couple of problems with this:
1) If the group panel is initially hidden (ShowGroupPanel="false"), the _groupPanel property appears to be missing.
2) If the group panel is shown and I hide it using this method, it reappears after the next postback (e.g. re-sorting).
1) If the group panel is initially hidden (ShowGroupPanel="false"), the _groupPanel property appears to be missing.
2) If the group panel is shown and I hide it using this method, it reappears after the next postback (e.g. re-sorting).
0
Hello,
Since the set_visible() property hides the group panel only on the client, you need to persist the visible state manually after postback. For example you can use a hidden field on the page which value you set when the showHide() method is called. It will notify whether the group panel should be visible after postback, or not (you can set this state in the ItemCreated event handler of the grid).
Regards,
Tsvetina
the Telerik team
Since the set_visible() property hides the group panel only on the client, you need to persist the visible state manually after postback. For example you can use a hidden field on the page which value you set when the showHide() method is called. It will notify whether the group panel should be visible after postback, or not (you can set this state in the ItemCreated event handler of the grid).
Regards,
Tsvetina
the Telerik team
Browse the vast support resources we have to jumpstart your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.
0

dmw
Top achievements
Rank 1
answered on 25 Nov 2010, 03:58 PM
Thanks for the suggestion, I'll give it a try.