RadGrid - group header not displaying properly

3 posts, 0 answers
  1. madhavi
    madhavi avatar
    30 posts
    Member since:
    Jul 2014

    Posted 29 Sep 2017 Link to this post

    Hi,

          I am having trouble in displaying group header correctly in RadGrid. Most of the group headers are displaying fine, but few not. I am not able to figure it out, what is causing that issue. Below are my grid and group settings. I am also attaching the grid screenshot for reference. Any suggestions please, what I am doing wrong.

    Thank you, Madhavi

                        <t:RadGrid ID="rgLEV" runat="server"
                                        AllowSorting="True" GridLines="None" ShowFooter="True" AutoGenerateColumns="false" EnableViewState = "true"
                                        GroupingEnabled="true" ShowGroupPanel="true" OnGroupsChanging="rgLEV_GroupsChanging" AllowMultiRowSelection="true"  
                                        HeaderStyle-Wrap="false" ItemStyle-Wrap="false" GroupingSettings-GroupByFieldsSeparator=""                                   
                                        OnNeedDataSource="rgLEV_NeedDataSource"
                                        OnPreRender="rgLEV_PreRender"
                                        OnItemCommand="rgLEV_ItemCommand"
                                        OnUpdateCommand="rgLEV_UpdateCommand"
                                        OnItemCreated="rgLEV_ItemCreated" 
                                        OnDetailTableDataBind="rgLEV_DetailTableDataBind"
                                        OnItemDataBound="rgLEV_ItemDataBound"
                                        OnExportCellFormatting="rgLEV_ExportCellFormatting">

                            <ClientSettings AllowDragToGroup="True" AllowColumnsReorder="True" 
                                    ReorderColumnsOnClient="True">  
                                    <Selecting AllowRowSelect="true" EnableDragToSelectRows="true" />    
                            </ClientSettings>

                         <GroupingSettings RetainGroupFootersVisibility="true"/>

                        <GroupByExpressions>
                                <t:GridGroupByExpression>
                                  
                                    <SelectFields>
                                        <t:GridGroupByField FieldName="EMP_NAME_LINE" HeaderValueSeparator="" HeaderText=" " />
                                    </SelectFields>
                                    <SelectFields>
                                        <t:GridGroupByField FieldName="EMPLOYEE_ID" FormatString="({0})" HeaderValueSeparator="" HeaderText="&nbsp;"/>
                                    </SelectFields>
                                    <SelectFields>
                                        <t:GridGroupByField Aggregate="Sum" FormatString="{0:F2}" FieldName="WORKED_HOURS" HeaderText="&nbsp;&nbsp;&nbsp;Hours" />
                                    </SelectFields>
                                    <SelectFields>
                                        <t:GridGroupByField Aggregate="Sum" FormatString="{0:F2}" FieldName="LD_POT_OT_HOURS"  HeaderText="&nbsp;&nbsp;&nbsp;OT" />
                                    </SelectFields>
                                    <SelectFields>
                                        <t:GridGroupByField Aggregate="Sum" FormatString="{0:F2}" FieldName="LD_POT_DT_HOURS" HeaderText="&nbsp;&nbsp;&nbsp;DT" />
                                    </SelectFields>
                                      <GroupByFields>
                                        <t:GridGroupByField FieldName="EMP_NAME_LINE" />
                                    </GroupByFields>
                                </t:GridGroupByExpression>
                                        
                                <t:GridGroupByExpression>                         
                                    <SelectFields>
                                        <t:GridGroupByField FieldName="WORKED_DT" FormatString="{0:MM/dd/yyyy}" HeaderText="Date" />
                                    </SelectFields>
                                        <SelectFields>
                                        <t:GridGroupByField Aggregate="Sum" FormatString="{0:F2}" FieldName="WORKED_HOURS"  HeaderText="&nbsp;&nbsp;&nbsp;Hours" />
                                    </SelectFields>
                                    <SelectFields>
                                        <t:GridGroupByField Aggregate="Sum" FormatString="{0:F2}" FieldName="OT_HOURS" HeaderText="&nbsp;&nbsp;&nbsp;OT" />
                                    </SelectFields>
                                    <SelectFields>
                                        <t:GridGroupByField Aggregate="Sum" FormatString="{0:F2}" FieldName="DT_HOURS" HeaderText="&nbsp;&nbsp;&nbsp;DT" />
                                    </SelectFields>
                                    <GroupByFields>
                                        <t:GridGroupByField FieldName="WORKED_DT" />
                                    </GroupByFields>
                                </t:GridGroupByExpression>
                            </GroupByExpressions>

  2. madhavi
    madhavi avatar
    30 posts
    Member since:
    Jul 2014

    Posted 29 Sep 2017 Link to this post

    I want to add one more issue to this problem. If I add third group level to the grid, all that level group headers don't show totals at all. Attaching the screenshot for reference. 

     <t:GridGroupByExpression>
                <GroupByFields>
                     <t:GridGroupByField FieldName="PAY_TYPE_CODE"/>
                 </GroupByFields>
                 <SelectFields>
                      <t:GridGroupByField FieldName="PAY_TYPE_CODE"  HeaderText="Pay" />
                 </SelectFields>
                  <SelectFields>
                      <t:GridGroupByField Aggregate="SUM" FormatString="{0:F2}" FieldName="WORKED_HOURS" HeaderText="&nbsp;&nbsp;&nbsp;Hours" />
                   </SelectFields>
                    <SelectFields>
                        <t:GridGroupByField Aggregate="Sum" FormatString="{0:F2}" FieldName="OT_HOURS" HeaderText="&nbsp;&nbsp;&nbsp;OT" />
                     </SelectFields>
                      <SelectFields>
                            <t:GridGroupByField Aggregate="Sum" FormatString="{0:F2}" FieldName="DT_HOURS" HeaderText="&nbsp;&nbsp;&nbsp;DT" />
                      </SelectFields>
                       <SelectFields>
                            <t:GridGroupByField Aggregate="Sum"  FormatString="{0:F2}" FieldName="ASSIGNED_DOLLARS" HeaderText="&nbsp;&nbsp;&nbsp;Dollars:$" />
                       </SelectFields>

    </t:GroupGroupByExpression>

  3. madhavi
    madhavi avatar
    30 posts
    Member since:
    Jul 2014

    Posted 03 Oct 2017 in reply to madhavi Link to this post

    Able to figure it out, why only that particular record header was not displaying with values. There was extra space for that employee name field, which is causing distortion to the header.

    Any ideas, why the header is not displaying any values, when we add 3rd group level to the grid. Or could it be a bug in telerik. Please advice.

    - Thank you

Back to Top