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

Simplest of groupings

5 Answers 42 Views
Grid
This is a migrated thread and some comments may be shown as answers.
DoomerDGR8
Top achievements
Rank 2
Iron
Iron
Iron
DoomerDGR8 asked on 02 Dec 2010, 05:44 PM
Hello. I'm trying to achieve the following look: The column columnUserName needs to be grouped and for all the counties that relates to a user, he should be repeated just once. I need the group NOT expanded. I also want the user NOT able to make any visual changes i.e. change grouping at run-time. Thanks.

<fieldset id="fieldsetCountyAssignments" style="width: 868px">
              <legend>
                County Assignments:
              </legend>
              <telerik:RadGrid ID="RadGridCountyAssignments2" runat="server" AutoGenerateColumns="False" AllowPaging="True"
                GridLines="None" Skin="Office2007" SkinID="RadGrid_UnPageable" DataSourceID="LinqDataSourceAssignedCounties"
                ShowGroupPanel="True">
                <MasterTableView DataKeyNames="OID" DataSourceID="LinqDataSourceAssignedCounties" GroupsDefaultExpanded="true">
                  <Columns>
                    <telerik:GridBoundColumn DataField="UserName" HeaderText="User" UniqueName="columnUserName"  />
                    <telerik:GridBoundColumn DataField="CountyName" HeaderText="County" UniqueName="columnCountyName" Groupable="False" />
                  </Columns>
                  <GroupByExpressions>
                    <telerik:GridGroupByExpression>
                      <SelectFields>
                        <telerik:GridGroupByField FieldName="UserName" />
                      </SelectFields>
                      <GroupByFields>
                        <telerik:GridGroupByField FieldName="UserName" />
                      </GroupByFields>
                    </telerik:GridGroupByExpression>
                  </GroupByExpressions>
                </MasterTableView>
                <ClientSettings AllowDragToGroup="True">
                </ClientSettings>
              </telerik:RadGrid>
              <asp:Button ID="ButtonModifyAssignments" runat="server" OnClick="ButtonModifyAssignments_Click" Text="Modify Assignments" />
            </fieldset>

5 Answers, 1 is accepted

Sort by
0
DoomerDGR8
Top achievements
Rank 2
Iron
Iron
Iron
answered on 03 Dec 2010, 10:22 AM
Help please.
0
Marin
Telerik team
answered on 07 Dec 2010, 03:55 PM
Hi Hassan,

From the code snippet I see that the grid has been configured to group by UserName. In order to prevent the defaut expanding for the groups in the markup you should set:
GroupsDefaultExpanded="false"

Also to forbid grouping from the user at run-time you should set:
<ClientSettings AllowDragToGroup="False">

Let me know how this works for you and if you have any other questions.

All the best,
Marin
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
DoomerDGR8
Top achievements
Rank 2
Iron
Iron
Iron
answered on 07 Dec 2010, 04:42 PM
Well, I want the groups expanded but the UserName value be somewhat like merged (like in Excel). See image...

Thanks for replying.

Still need help :)
0
Accepted
Marin
Telerik team
answered on 08 Dec 2010, 02:47 PM
Hi Hassan,

I am afraid such functionality for merging cells is not supported by the current version of RadGrid.

Feel free to contact us again if other questions arise.

Regards,
Marin
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
DoomerDGR8
Top achievements
Rank 2
Iron
Iron
Iron
answered on 08 Dec 2010, 03:05 PM
Very well. Current RadGrid will have to do then. Thanks.
Tags
Grid
Asked by
DoomerDGR8
Top achievements
Rank 2
Iron
Iron
Iron
Answers by
DoomerDGR8
Top achievements
Rank 2
Iron
Iron
Iron
Marin
Telerik team
Share this question
or