Simplest of groupings

6 posts, 1 answers
  1. DoomerDGR8
    DoomerDGR8 avatar
    133 posts
    Member since:
    Aug 2010

    Posted 02 Dec 2010 Link to this post

    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>
  2. DoomerDGR8
    DoomerDGR8 avatar
    133 posts
    Member since:
    Aug 2010

    Posted 03 Dec 2010 Link to this post

    Help please.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Marin
    Admin
    Marin avatar
    1045 posts

    Posted 07 Dec 2010 Link to this post

    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.
  5. DoomerDGR8
    DoomerDGR8 avatar
    133 posts
    Member since:
    Aug 2010

    Posted 07 Dec 2010 Link to this post

    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 :)
  6. Answer
    Marin
    Admin
    Marin avatar
    1045 posts

    Posted 08 Dec 2010 Link to this post

    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.
  7. DoomerDGR8
    DoomerDGR8 avatar
    133 posts
    Member since:
    Aug 2010

    Posted 08 Dec 2010 Link to this post

    Very well. Current RadGrid will have to do then. Thanks.
Back to Top
UI for ASP.NET Ajax is Ready for VS 2017