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

Collapsable rows and user control checkbox

1 Answer 49 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Patrick
Top achievements
Rank 1
Patrick asked on 24 Nov 2014, 08:09 PM
I am trying to get collapsable groups on a radgrid along with a user control which will alter which columns appear in the grid via checkbox.
My grouping is accomplished in the code behind.

If I set the radgrid viewstateMode to "Disabled" then my user control checkbox values are recognized and with a submit button the columns appear and disappear.  

However the grouped rows cannot be collapsed.  If I switch the ViewStateMode to "Enabled" then the grouped rows collapse correctly but now the user control checkbox value never changes.(even though it has on screen)

Is there anyway to have the rows correctly collapse/expand AND recognize the current value the client selected checkbox of the user control?

This is part of the RadGrid:
         <table width="100%" cellpadding="0" cellspacing="0" class="ContentTable">
            <tr>
                <td class="ContentTitleHeight">Specialty</td>
            </tr>
            <tr>
                <td>
                    <telerik:RadGrid id="rgSpecialty" 
                        runat="server"  
                        ShowGroupPanel="false" 
                        autogeneratecolumns="false" 
                        AllowFilteringByColumn="true" 
                        AllowSorting="true" 
                        ViewStateMode="Disabled"  
                        OnNeedDataSource="rgSpecialty_NeedDataSource"
                        GroupingSettings-CaseSensitive ="false"   >



1 Answer, 1 is accepted

Sort by
0
Patrick
Top achievements
Rank 1
answered on 25 Nov 2014, 04:39 PM
I was able to resolve the issue by moving the user controls (checkboxes, buttons, etc.) to the aspx page directly and not using a control.   Then the various checkboxes values were seen correctly.  I also had to move the ViewStateMode to a panel around the grid rather than setting it in the grid itself.  
Tags
Grid
Asked by
Patrick
Top achievements
Rank 1
Answers by
Patrick
Top achievements
Rank 1
Share this question
or