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

Radgrid Grouping Collapse Expand

7 Answers 285 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Rolf
Top achievements
Rank 1
Rolf asked on 29 Aug 2011, 12:28 PM
Hi
I have a RadGrid with Grouping, Collapse and Expand functionality.
That works very well.

My problem:
When I click the command "Edit", edit mode = "popup", go to Collapse and Expand selections lost.
What can I do that the users stay with selection Collapse and Expand exist forever?

Sorry for my bad English
Rolf Burri
Switzerland


<telerik:RadGrid ID="RadGrid_Zeiten" runat="server" AutoGenerateColumns="False"
DataSourceID="SqlDataSource_Zeiten" GridLines="Vertical" Skin="Office2007"
AllowAutomaticUpdates="True" AutoGenerateEditColumn="True"
style="font-weight: 700">
<ExportSettings ExportOnlyData="True" IgnorePaging="True">
</ExportSettings>
<MasterTableView CommandItemDisplay="None" datakeynames="ID"
datasourceid="SqlDataSource_Zeiten" editmode="PopUp" font-bold="False"
font-italic="False" font-names="Verdana" font-overline="False" font-size="8"
font-strikeout="False" font-underline="False">
<RowIndicatorColumn>
<HeaderStyle Width="20px" />
</RowIndicatorColumn>
<ExpandCollapseColumn>
<HeaderStyle Width="20px" />
</ExpandCollapseColumn>
<GroupByExpressions>
<telerik:GridGroupByExpression>
<SelectFields>
<telerik:GridGroupByField FieldName="nachname" HeaderText=" "
HeaderValueSeparator=" " />
<telerik:GridGroupByField FieldName="vorname" HeaderText=" "
HeaderValueSeparator=" " />
</SelectFields>
<GroupByFields>
<telerik:GridGroupByField FieldName="username" SortOrder="Ascending" />
</GroupByFields>
</telerik:GridGroupByExpression>
</GroupByExpressions>
<Columns>
<telerik:GridBoundColumn DataField="user_id" ReadOnly="True"
SortExpression="user_id" UniqueName="user_id" Visible="False">
</telerik:GridBoundColumn>
<telerik:GridBoundColumn DataField="name_tag" HeaderText="Tag"
SortExpression="name_tag" UniqueName="name_tag" ReadOnly="True">
</telerik:GridBoundColumn>
<telerik:GridBoundColumn DataField="Datum" DataFormatString="{0:dd.MM.yyyy}"
HeaderText="Datum" SortExpression="Datum" UniqueName="Datum"
ReadOnly="True">
</telerik:GridBoundColumn>
<telerik:GridBoundColumn DataField="Vorname" HeaderText="Vorname"
SortExpression="Vorname" UniqueName="Vorname" ReadOnly="True">
</telerik:GridBoundColumn>
<telerik:GridBoundColumn DataField="Nachname" HeaderText="Nachname"
SortExpression="Nachname" UniqueName="Nachname" ReadOnly="True">
</telerik:GridBoundColumn>
<telerik:GridDateTimeColumn DataField="arbeitszeiten_1_von"
DataFormatString="{0:HH:mm}" HeaderText="Von" PickerType="TimePicker"
UniqueName="arbeitszeiten_1_von">
</telerik:GridDateTimeColumn>
<telerik:GridDateTimeColumn DataField="arbeitszeiten_1_bis"
DataFormatString="{0:HH:mm}" HeaderText="Bis" PickerType="TimePicker"
UniqueName="arbeitszeiten_1_bis">
</telerik:GridDateTimeColumn>
<telerik:GridDateTimeColumn DataField="arbeitszeiten_2_von"
DataFormatString="{0:HH:mm}" HeaderText="Von" PickerType="TimePicker"
UniqueName="arbeitszeiten_2_von">
<ItemStyle BackColor="#E6EBF3" />
</telerik:GridDateTimeColumn>
<telerik:GridDateTimeColumn DataField="arbeitszeiten_2_bis"
DataFormatString="{0:HH:mm}" HeaderText="Bis" PickerType="TimePicker"
UniqueName="arbeitszeiten_2_bis">
<ItemStyle BackColor="#E6EBF3" />
</telerik:GridDateTimeColumn>
<telerik:GridDateTimeColumn DataField="arbeitszeiten_3_von"
DataFormatString="{0:HH:mm}" HeaderText="Von" PickerType="TimePicker"
UniqueName="arbeitszeiten_3_von">
</telerik:GridDateTimeColumn>
<telerik:GridDateTimeColumn DataField="arbeitszeiten_3_bis"
DataFormatString="{0:HH:mm}" HeaderText="Bis" PickerType="TimePicker"
UniqueName="arbeitszeiten_3_bis">
</telerik:GridDateTimeColumn>
<telerik:GridDateTimeColumn DataField="arbeitszeiten_4_von"
DataFormatString="{0:HH:mm}" HeaderText="Von" PickerType="TimePicker"
UniqueName="arbeitszeiten_4_von">
<ItemStyle BackColor="#E6EBF3" />
</telerik:GridDateTimeColumn>
<telerik:GridDateTimeColumn DataField="arbeitszeiten_4_bis"
DataFormatString="{0:HH:mm}" HeaderText="Bis" PickerType="TimePicker"
UniqueName="arbeitszeiten_4_bis">
<ItemStyle BackColor="#E6EBF3" />
</telerik:GridDateTimeColumn>
<telerik:GridBoundColumn DataField="total_zeiten" HeaderText="Total Zeiten"
UniqueName="total_zeiten" ReadOnly="True" SortExpression="total_zeiten">
</telerik:GridBoundColumn>
<telerik:GridBoundColumn DataField="total_arbeiten" HeaderText="Total Arbeiten"
ReadOnly="True" SortExpression="total_arbeiten" UniqueName="total_arbeiten">
</telerik:GridBoundColumn>
<telerik:GridCheckBoxColumn DataField="abgeschlossen" HeaderText="Gesendet"
ReadOnly="True" UniqueName="abgeschlossen">
</telerik:GridCheckBoxColumn>
</Columns>
<EditFormSettings>
<EditColumn UniqueName="EditCommandColumn1">
</EditColumn>
<FormStyle BackColor="#E6EBF3" />
<FormTableStyle BackColor="#E6EBF3" />
<FormMainTableStyle BackColor="#E6EBF3" BorderStyle="Double" />
<FormTableItemStyle BorderStyle="Solid" Height="20px" />
<FormTableAlternatingItemStyle BackColor="White" Height="20px" />
</EditFormSettings>
<GroupHeaderItemStyle Font-Bold="True" ForeColor="Black" />
</MasterTableView>
<GroupingSettings GroupByFieldsSeparator="" />
<GroupHeaderItemStyle Font-Bold="True" ForeColor="Black" />
<FilterMenu EnableTheming="True" Skin="Gray">
<CollapseAnimation Duration="200" Type="OutQuint" />
</FilterMenu>
</telerik:RadGrid>

7 Answers, 1 is accepted

Sort by
0
Shinu
Top achievements
Rank 2
answered on 29 Aug 2011, 12:52 PM
Hello Rolf,

Please take a look at the following code library which explains how to persist the groups expanded/collapsed state in RadGrid.
Persist Groups Expanded State on Rebind

-Shinu.
0
Rolf
Top achievements
Rank 1
answered on 30 Aug 2011, 09:30 AM
Super!
What a great support.
It works perfectly.
many thanks
Rolf
0
Peter
Top achievements
Rank 1
answered on 07 Mar 2013, 07:17 AM
Thanks.

Is there anyway then to have the collapsed grid treated as 0 or 1 item, so 9 or 10 more items show from the next group if the page size of the grid is 10? In other words, can the grid ignore collapsed groups in the item count?
0
Eyup
Telerik team
answered on 12 Mar 2013, 08:24 AM
Hi Peter,

I am afraid the grid generates values only for the items on the current page. Therefore, the items on the next page are not available at the current time. This behavior depends on the RadGrid implicit grouping logic and currently there are no scheduled plans to modify this behavior.

I hope the clarification was helpful.

Kind regards,
Eyup
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
0
Peter
Top achievements
Rank 1
answered on 21 Mar 2013, 03:50 AM
No worries Eyup - we haven't had any issues so far - I can just see a user asking about this behaviour one day :).
0
Frank
Top achievements
Rank 1
answered on 02 Feb 2017, 02:30 PM
Problem still exist. I refuse to put in tons of ugly code as workaround!
0
Eyup
Telerik team
answered on 07 Feb 2017, 12:25 PM
Hello Frank,

You can examine the RadGridGetAllSelectedItemsImproved.zip sample provided in the following post and see the implementation demonstrated there:
http://www.telerik.com/support/code-library/get-selected-items-through-all-pages#1eTU8nr-GUG8zfGgOGbIcA


I hope this will prove helpful.

Regards,
Eyup
Telerik by Progress
Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
Tags
Grid
Asked by
Rolf
Top achievements
Rank 1
Answers by
Shinu
Top achievements
Rank 2
Rolf
Top achievements
Rank 1
Peter
Top achievements
Rank 1
Eyup
Telerik team
Frank
Top achievements
Rank 1
Share this question
or