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

group header alignment

0 Answers 81 Views
Grid
This is a migrated thread and some comments may be shown as answers.
newbie
Top achievements
Rank 1
newbie asked on 26 Jul 2010, 06:24 PM
I have two levels of grouping in my grid. i recently upgraded to the latest ASP.NET AJAX controls and was having trouble with the new css. My grid group headers do not look aligned as they did with the earlier controls. I have attached a screen shot of how they appear. It seems i need to apply some padding but i was unable to do that without affecting the other parts of the grid. I need to change just the grid group header.

I also want to change the font of only my first level of group header and have my second level header indented. Is that possinle? I have posted this query on a different thread earlier but did not recieve a response from the telerik team yet.

Please let me know the solution to above issues.

Below is my grid CSS and declaration:

/*Telerik RadGrid Default Skin*/
  
/*global*/
  
.RadGrid_MLightning
{
    background: #F9F9F9;
    border: 0px !important;
    border-collapse: separate !important;
    color: #000;
    border-right-width: 0px;
}
  
.RadGrid_MLightning,
.RadGrid_MLightning .rgMasterTable,
.RadGrid_MLightning .rgDetailTable,
.RadGrid_MLightning .rgGroupPanel table,
.RadGrid_MLightning .rgCommandRow table,
.RadGrid_MLightning .rgEditForm table,
.RadGrid_MLightning .rgPager table,
.GridToolTip_MLightning
{
    font: Tahoma;
    border-right: 0px;
}
  
  
  
.RadGrid_MLightning .rgAdd,
.RadGrid_MLightning .rgRefresh,
.RadGrid_MLightning .rgEdit,
.RadGrid_MLightning .rgDel,
.RadGrid_MLightning .rgFilter,
.RadGrid_MLightning .rgPagePrev,
.RadGrid_MLightning .rgPageNext,
.RadGrid_MLightning .rgPageFirst,
.RadGrid_MLightning .rgPageLast,
.RadGrid_MLightning .rgExpand,
.RadGrid_MLightning .rgCollapse,
.RadGrid_MLightning .rgSortAsc,
.RadGrid_MLightning .rgSortDesc,
.RadGrid_MLightning .rgUpdate,
.RadGrid_MLightning .rgCancel,
.RadGrid_MLightning .rgUngroup,
.RadGrid_MLightning .rgExpXLS,
.RadGrid_MLightning .rgExpDOC,
.RadGrid_MLightning .rgExpPDF,
.RadGrid_MLightning .rgExpCSV
{
    background-image:url('Grid/sprite.gif');
}
  
/*header*/
  
.RadGrid_MLightning .rgHeaderDiv
{
    background:#ededed 0 -7550px repeat-x url('Grid/sprite.gif');
}
.rgTwoLines .rgHeaderDiv
{
    background-position:0 -7050px;
}
  
.RadGrid_MLightning .rgHeader,
.RadGrid_MLightning th.rgResizeCol
{
    border-right: solid 1px #FFFFFF;
    border-bottom:1px solid #828282;
    background: #003e7e repeat-x 0 100%;
    border-bottom: solid 1px #003e7e;
    border-top: solid 1px #003e7e;
    height: 16px;
    color: #ffffff;
    font-family:Tahoma;
}
  
.RadGrid_MLightning th.rgSorted
{
    background-color:#c4c4c4;
    background-position:0 -2600px;
}
  
.RadGrid_MLightning .rgHeader,
.RadGrid_MLightning .rgHeader a
{
    color: #ffffff;
    text-decoration: none;
}
  
/*rows*/
  
.RadGrid_MLightning .rgRow td,
.RadGrid_MLightning .rgAltRow td,
.RadGrid_MLightning .rgEditRow td,
.RadGrid_MLightning .rgFooter td
{
    border-style:solid;
    border-width: 0 0 1px 0;
    border-right-width : 1px;   
}
  
.RadGrid_MLightning .rgRow td
{
    border-color:#ffffff;
    padding: 0 0 7px 0;
}
  
  
.RadGrid_MLightning .rgSelectedRow .rgSorted,
.RadGrid_MLightning .rgActiveRow .rgSorted,
.RadGrid_MLightning .rgHoveredRow .rgSorted,
.RadGrid_MLightning .rgEditRow .rgSorted
{
    background-color:transparent;
}
  
.RadGrid_MLightning .rgRow a,
.RadGrid_MLightning .rgAltRow a,
.RadGrid_MLightning .rgEditRow a,
.RadGrid_MLightning tr.rgEditRow a,
.RadGrid_MLightning tr.rgHoveredRow a,
.RadGrid_MLightning tr.rgActiveRow a,
.RadGrid_MLightning .rgFooter a,
.RadGrid_MLightning .rgEditForm a
{
    color:#000000;
}
  
.RadGrid_MLightning .rgSelectedRow
{
    background:#828282 0 -3900px repeat-x url('Grid/sprite.gif');
    color:#ffffff;
}
*+html .RadGrid_MLightning .rgSelectedRow .rgSorted{background-color:#828282}
* html .RadGrid_MLightning .rgSelectedRow .rgSorted{background-color:#828282}
  
.RadGrid_MLightning .rgSelectedRow a
{
    color:#ffffff;
}
  
.RadGrid_MLightning .rgActiveRow,
.RadGrid_MLightning .rgHoveredRow
{
    background:#c4c4c4 0 -2900px repeat-x url('Grid/sprite.gif');
    color:#333333;
}
*+html .RadGrid_MLightning .rgActiveRow .rgSorted,
*+html .RadGrid_MLightning .rgHoveredRow .rgSorted{background-color:#c4c4c4}
* html .RadGrid_MLightning .rgActiveRow .rgSorted,
* html .RadGrid_MLightning .rgHoveredRow .rgSorted{background-color:#c4c4c4}
  
.RadGrid_MLightning .rgEditRow
{
    background:#ffffff 0 -4900px repeat-x url('Grid/sprite.gif');
    color:#333333;
}
*+html .RadGrid_MLightning .rgEditRow .rgSorted{background-color:#ffffff}
* html .RadGrid_MLightning .rgEditRow .rgSorted{background-color:#ffffff}
  
.RadGrid_MLightning .rgActiveRow td,
.RadGrid_MLightning .rgActiveRow td.rgSorted,
.RadGrid_MLightning .rgHoveredRow td,
.RadGrid_MLightning .rgHoveredRow td.rgSorted
{
    border-bottom-color:#9e9e9e;
}
  
.RadGrid_MLightning .rgSelectedRow td,
.RadGrid_MLightning .rgSelectedRow td.rgSorted
{
    border-bottom-color:#6b6b6b;
}
  
/*footer*/
  
.RadGrid_MLightning .rgFooterDiv,
.RadGrid_MLightning .rgFooter
{
    background:#ededed;
}
  
.RadGrid_MLightning .rgFooter td
{
    border-top:1px solid #828282;
    border-bottom:1px solid #ffffff;
}
  
/*status*/
  
.RadGrid_MLightning .rgPager .rgStatus
{
    border:1px solid;
    border-color:#828282 #c9c9c9 #ededed #c9c9c9;
    border-left:0;
}
  
.RadGrid_MLightning .rgStatus div
{
    background-image:url('Common/loading_small.gif');
}
  
/*pager*/
  
.RadGrid_MLightning .rgPager
{
    background:#ededed;
}
  
.RadGrid_MLightning td.rgPagerCell
{
    border:1px solid;
    border-color:#828282 #ededed #ededed;
    border-right:0;
}
  
.RadGrid_MLightning .rgInfoPart
{
    color:#ffffff;
}
  
.RadGrid_MLightning .rgInfoPart strong
{
    color:#ffffff;
}
  
.RadGrid_MLightning .rgPageFirst
{
    background-position:0 -550px;
}
.RadGrid_MLightning .rgPageFirst:hover
{
    background-position:0 -600px;
}
.RadGrid_MLightning .rgPagePrev
{
    background-position:0 -700px;
}
.RadGrid_MLightning .rgPagePrev:hover
{
    background-position:0 -750px;
}
.RadGrid_MLightning .rgPageNext
{
    background-position:0 -850px;
}
.RadGrid_MLightning .rgPageNext:hover
{
    background-position:0 -900px;
}
.RadGrid_MLightning .rgPageLast
{
    background-position:0 -1000px;
}
.RadGrid_MLightning .rgPageLast:hover
{
    background-position:0 -1050px;
}
  
.RadGrid_MLightning .rgPager .rgPagerButton
{
    border-color:#d1d1d1 #adadad #8c8c8c;
    background:#e8e8e8 repeat-x 0 -1550px url('Grid/sprite.gif');
    color:#000000;
    font-family:"segoe ui",arial,sans-serif;
}
  
.RadGrid_MLightning .rgNumPart a:hover,
.RadGrid_MLightning .rgNumPart a:hover span,
.RadGrid_MLightning .rgNumPart a.rgCurrentPage,
.RadGrid_MLightning .rgNumPart a.rgCurrentPage span
{
    background:no-repeat url('Grid/sprite.gif');
}
  
.RadGrid_MLightning .rgNumPart a
{
    color:#000000;
}
  
.RadGrid_MLightning .rgNumPart a:hover
{
    background-position:100% -1250px;
}
  
.RadGrid_MLightning .rgNumPart a:hover span
{
    background-position:0 -1150px;
}
  
.RadGrid_MLightning .rgNumPart a.rgCurrentPage,
.RadGrid_MLightning .rgNumPart a.rgCurrentPage:hover
{
    background-position:100% -1450px;
}
  
.RadGrid_MLightning .rgNumPart a.rgCurrentPage span,
.RadGrid_MLightning .rgNumPart a.rgCurrentPage:hover span
{
    background-position:0 -1350px;
}
  
/*sorting, reordering*/
  
.RadGrid_MLightning .rgHeader .rgSortAsc
{
    background-position:3px -248px;
    height:10px;
}
  
.RadGrid_MLightning .rgHeader .rgSortDesc
{
    background-position:3px -198px;
    height:10px;
}
  
.GridReorderTop_MLightning,
.GridReorderBottom_MLightning
{
    background:0 0 no-repeat url('Grid/sprite.gif');
}
  
.GridReorderBottom_MLightning
{
    background-position:0 -50px;
}
  
/*filtering*/
  
.RadGrid_MLightning .rgFilterRow
{
    background:#ededed;
}
  
.RadGrid_MLightning .rgFilterRow td
{
    border-bottom:1px solid #828282;
}
  
.RadGrid_MLightning .rgFilter
{
    background-position:0 -300px;
}
  
.RadGrid_MLightning .rgFilter:hover
{
    background-position:0 -350px;
}
  
.RadGrid_MLightning .rgFilterActive,
.RadGrid_MLightning .rgFilterActive:hover
{
    background-position:0 -400px;
}
  
.RadGrid_MLightning .rgFilterBox
{
    border-color:#8f8f8f #c9c9c9 #c9c9c9 #8f8f8f;
    font-family:"segoe ui",arial,sans-serif;
    color:#333333;
}
  
/*filter context menu*/
  
.RadMenu_MLightning .rgHCMClear,
.RadMenu_MLightning .rgHCMFilter
{
    border-color:#d1d1d1 #a8a8a8 #8c8c8c;
    background:#e8e8e8 center -23px repeat-x url('FormDecorator/ButtonSprites.gif');
    color:#000000;
    font-family:"segoe ui",arial,sans-serif;
}
  
.RadMenu_MLightning .rgHCMClear:hover,
.RadMenu_MLightning .rgHCMFilter:hover
{
    border-color:#d1d1d1 #bababa #a3a3a3;
    background-position:center -67px;
    background-color:#e6e6e6;
}
  
/*grouping*/
  
.RadGrid_MLightning .rgGroupPanel
{
    background-color: #e8e8e8;
    width: 100%;
    border-collapse: collapse;
    border-bottom: 1px solid #b1b1b1;
}
  
.RadGrid_MLightning .rgGroupPanel td
{
    padding: 2px 4px;
}
  
.RadGrid_MLightning .rgGroupPanel td td
{
    padding:0;
}
  
.RadGrid_MLightning .rgGroupPanel .rgSortAsc
{
    background-position:4px -144px;
}
  
.RadGrid_MLightning .rgGroupPanel .rgSortDesc
{
    background-position:4px -94px;
}
  
.RadGrid_MLightning .rgUngroup
{
    background-position:0 -6998px;
}
  
.RadGrid_MLightning .rgGroupItem
{
    background: #efefef;
    color: #999999;
    border: solid 1px white;
    border-right: solid 1px #c6c6c6;
    border-bottom: solid 1px #c6c6c6;
    white-space:  nowrap;
    font-size: 10px;
}
  
.RadGrid_MLightning .rgMasterTable td.rgGroupCol,
.RadGrid_MLightning .rgMasterTable td.rgExpandCol
{
    border-color:#d9d9d9;
    background:#d9d9d9 none;
}
  
.RadGrid_MLightning .rgGroupHeader
{    
    height:25px;
}
  
.RadGrid_MLightning .rgGroupHeader td
{
    border-left:0px solid #fff;
    border-right:0;
    border-bottom: solid 1px #c2c2c2;   
    font-family: Tahoma;
    font-size: 10pt;
    padding:7px;
}
  
.RadGrid_MLightning .rgGroupHeader td.rgGroupCol
{
    border-top-color:#828282;
}
  
.RadGrid_MLightning .rgExpand
{
    background-position:5px -496px;
}
  
.RadGrid_MLightning .rgCollapse
{
    background-position:3px -444px;
}
  
/*editing*/
  
.RadGrid_MLightning .rgEditForm
{
    border-bottom:1px solid #828282;
}
  
.RadGrid_MLightning .rgUpdate
{
    background-position:0 -1800px;
}
  
.RadGrid_MLightning .rgCancel
{
    background-position:0 -1850px;
}
  
/*hierarchy*/
  
.RadGrid_MLightning .rgDetailTable
{
    border-color:#828282;
}
  
/*command row*/
  
.RadGrid_MLightning .rgCommandRow
{
    background: #a7a7a9;
    color: #ffffff;
}
  
.RadGrid_MLightning .rgCommandCell
{
    background: #a7a7a9;
    border: solid 1px #c7c7c7;
    color: #ffffff;
    height: 16px;
    padding-top: 1px;
    padding-bottom: 1px;
    font-family: Tahoma;
    font-size: 9pt;
    text-align:right;
      
}
  
.RadGrid_MLightning tfoot .rgCommandCell
{
    border-top:1px solid;
    border-bottom:0;
}
  
.RadGrid_MLightning .rgCommandTable td
{
    border:0;
    padding:2px 7px;
}
  
.RadGrid_MLightning .rgCommandTable
{
    border:0;
    border-top:1px solid #fcfcfc;
    border-bottom:1px solid #e8e8e8;
}
  
.RadGrid_MLightning .rgCommandRow a
{
    color:#000000;
    text-decoration:none;
}
  
.RadGrid_MLightning .rgAdd
{
    margin-right:3px;
    background-position:0 -1650px;
}
  
.RadGrid_MLightning .rgRefresh
{
    margin-right:3px;
    background-position:0 -1600px;
}
  
.RadGrid_MLightning .rgEdit
{
    background-position:0 -1700px;
}
  
.RadGrid_MLightning .rgDel
{
    background-position:0 -1750px;
}
  
.RadGrid_MLightning .rgSelected .rgDel
{
    background-position:0 -1775px;
}
  
.RadGrid_MLightning .rgExpXLS,
.RadGrid_MLightning .rgExpDOC,
.RadGrid_MLightning .rgExpPDF,
.RadGrid_MLightning .rgExpCSV
{
    background-image:url('Grid/export.gif');
}
  
.RadGrid_MLightning .rgExpXLS
{
    background-position:0 0;
}
.RadGrid_MLightning .rgExpDOC
{
    background-position:0 -50px;
}
.RadGrid_MLightning .rgExpPDF
{
    background-position:0 -100px;
}
.RadGrid_MLightning .rgExpCSV
{
    background-position:0 -150px;
}
  
/*multirow select*/
  
.GridRowSelector_MLightning
{
    background:#545454;
}
  
/*row drag n drop*/
  
.GridItemDropIndicator_MLightning
{
    border-top:1px dashed #666666;
}
  
/*tooltip*/
  
.GridToolTip_MLightning
{
    border:1px solid #828282;
    padding:3px;
    background:#ffffff;
    color:#333333;
}
  
/*rtl*/
  
.RadGridRTL_MLightning .rgPageFirst
{
    background-position:0 -1000px;
}
.RadGridRTL_MLightning .rgPageFirst:hover
{
    background-position:0 -1050px;
}
.RadGridRTL_MLightning .rgPagePrev
{
    background-position:0 -850px;
}
.RadGridRTL_MLightning .rgPagePrev:hover
{
    background-position:0 -900px;
}
.RadGridRTL_MLightning .rgPageNext
{
    background-position:0 -700px;
}
.RadGridRTL_MLightning .rgPageNext:hover
{
    background-position:0 -750px;
}
.RadGridRTL_MLightning .rgPageLast
{
    background-position:0 -550px;
}
.RadGridRTL_MLightning .rgPageLast:hover
{
    background-position:0 -600px;
}
  
  
 DIV.RadGrid_MLightning TH.rgResizeCol {
  
    BACKGROUND-COLOR: #003E7E;
  
}
  
 DIV.RadGrid_MLightning .rgHeader {
  
    BACKGROUND-COLOR: #003E7E;
  
}
  
 DIV.RadGrid_MLightning .rgCommandRow {
  
    BACKGROUND-IMAGE: none;
    BACKGROUND-COLOR: #A7A7A9;
  
}
  
 DIV.RadGrid_MLightning .rgCommandCell {
  
    FONT-FAMILY: Tahoma;
    COLOR: #FFFFFF;
  
}
  
 DIV.RadGrid_MLightning TH.rgResizeCol {
  
    BACKGROUND-IMAGE: none;
  
    BORDER-TOP-COLOR: #00A1D6;
  
}
  
 DIV.RadGrid_MLightning .rgHeader {
  
    border-right: solid 1px #FFFFFF;
    border-bottom: solid 1px #003e7e;
    border-top: solid 1px #003e7e;
    background: #003e7e;
    font: bold 10pt Tahoma;
    color: #ffffff;
    height: 20px;
    vertical-align:middle;
  
}
  
 DIV.RadGrid_MLightning .rgHeader A {
  
    color: #ffffff;
    text-decoration: none;
    font: bold 11px Verdana, Arial, Sans-serif;
}
  
DIV.RadGrid_MLightning .rgRow TD,
DIV.RadGrid_MLightning .rgAltRow TD,
DIV.RadGrid_MLightning .rgSelectedRow TD,
DIV.RadGrid_MLightning .rgActiveRow TD,
DIV.RadGrid_MLightning .rgEditRow TD
{
    padding-top:2px;
    padding-bottom:2px;
}
  
 DIV.RadGrid_MLightning .rgFilterRow TD {
  
    FONT-FAMILY: Tahoma;
  
}
  
 DIV.RadGrid_MLightning .rgRow TD A,
 DIV.RadGrid_MLightning .rgAltRow TD A {
  
    color: #73abc9;
    font-family:Tahoma;
    font-size:8pt;
  
}
  
DIV.RadGrid_MLightning .rgRow TD,
DIV.RadGrid_MLightning .rgAltRow TD {
  
    BACKGROUND-COLOR: #FFFFFF;
    white-space: normal;
    text-align: center;
    color: #898a8c;
    font-family: Tahoma;
    font-size: 8pt;
    padding: 10px 0px 10px 0px;
    border: solid 1px #C4C4C4;
      
}
  
DIV.RadGrid_MLightning .rgRow TD DIV,
DIV.RadGrid_MLightning .rgAltRow TD DIV{
      
    padding-left: 5px ;
}
  
 DIV.RadGrid_MLightning .rgRow,
 DIV.RadGrid_MLightning .rgAltRow {
  
    COLOR: #898A8C;
    background: #ffffff;
  
}
  
 DIV.RadGrid_MLightning TR.rgSelectedRow {
  
    BACKGROUND-COLOR: #707070;
  
}
  
 DIV.RadGrid_MLightning TABLE .rgActiveRow {
  
    BACKGROUND-COLOR: #EDF2D9;
  
}
  
 DIV.RadGrid_MLightning TABLE TR.rgHoveredRow {
  
    BACKGROUND-COLOR: #FFFFFF;
  
}
  
  
  
 DIV.RadGrid_MLightning .rgPager {
  
    BACKGROUND-COLOR: #898A8C;
    border-right: 0;
    color: #999;
  
}
  
 DIV.RadGrid_MLightning .rgPager .rgPagerCell {
      
    COLOR: #FFFFFF; 
    font-family: Tahoma;
    border: 1px solid #c7c7c7;
    height: 14px;
    padding-top: 1px;
    padding-bottom: 1px;
    font-family: Tahoma;
    font-size: 8pt;
}
  
DIV.RadGrid_MLightning .rgPager .rgPagerCell A{
  
    FONT-FAMILY: Tahoma;
    COLOR: #FFFFFF;
    padding-left : 5px;
}
  
 DIV.RadGrid_MLightning {
  
    PADDING-BOTTOM: 5px;
  
    MARGIN-TOP: 0px;
  
}
  
 DIV.RadGrid_MLightning TH.rgResizeCol {
  
    BORDER-LEFT-COLOR: transparent;
  
}
  
 DIV.RadGrid_MLightning .rgHeader {
  
    BORDER-LEFT-COLOR: transparent;
  
}
  
 DIV.RadGrid_MLightning .rgFilterRow TD {
  
    BORDER-BOTTOM: transparent 0px solid;
  
    BORDER-LEFT: #FFFFFF 1px solid;
  
    PADDING-BOTTOM: 0px;
  
    BACKGROUND-COLOR: #8FBCD1;
  
    BORDER-TOP-COLOR: transparent;
  
    PADDING-LEFT: 0px;
  
    PADDING-RIGHT: 0px;
  
    BORDER-RIGHT-COLOR: transparent;
  
    PADDING-TOP: 0px;
  
}
  
   
  
 DIV.RadGrid_MLightning .rgSelectedRow TD {
  
    PADDING-BOTTOM: 2px;
  
    PADDING-TOP: 2px;
  
}  
  
 DIV.RadGrid_MLightning .rgFooter {
  
    COLOR: #FFFFFF;
}
  
 DIV.RadGrid_MLightning .rgPager {
  
    COLOR: #FFFFFF;
  
}
  
   
  
 DIV.RadGrid_MLightning .rgFooter TD {
  
    BACKGROUND-COLOR: #8FBCD1;
  
}

<telerik:RadGrid ID="RadGridCalendar" runat="server" GridLines="None" AllowPaging="true"
                        PageSize="20" AllowFilteringByColumn="true" Width="975px" ShowHeader="true" OnColumnCreated="RadGridCalendar_ColumnCreated"
                        OnItemCreated="RadGridCalendar_ItemCreated" OnItemDataBound="RadGridCalendar_ItemDataBound"
                        OnPreRender="RadGridCalendar_PreRender" AutoGenerateColumns="False" EnableLinqExpressions="false"
                        ShowGroupPanel="false" OnItemCommand="RadGridCalendar_ItemCommand" AllowSorting="true"
                        AllowCustomPaging="false" OnNeedDataSource="RadGridCalendar_NeedDataSource">
                        <ClientSettings Resizing-AllowColumnResize="true">
                            <ClientEvents OnGridCreated="GridCreated" />
                            <Scrolling AllowScroll="true" UseStaticHeaders="true" ScrollHeight="450px" />
                        </ClientSettings>
                        <ExportSettings IgnorePaging="true" OpenInNewWindow="true" ExportOnlyData="false"
                            FileName="CalendarExport">
                            <Pdf AllowAdd="false" AllowCopy="true" AllowModify="true" AllowPrinting="true" Author="Anonymous"
                                Keywords="None" PageBottomMargin="1in" PageLeftMargin="1in" PageRightMargin="1in"
                                PageWidth="297mm" PageHeight="210mm" PageTopMargin="1in" PageTitle="Calendar"
                                Subject="Calendar Export" Title="Calendar" />
                        </ExportSettings>
                        <MasterTableView TableLayout="Fixed" HierarchyDefaultExpanded="true" ClientDataKeyNames="ActivityID"
                            Width="100%" CommandItemDisplay="Top" DataKeyNames="ActivityID">
                            <GroupByExpressions>
                                <telerik:GridGroupByExpression>
                                    <SelectFields>
                                        <telerik:GridGroupByField FieldName="ToDoType" HeaderText=" " HeaderValueSeparator=""
                                            FormatString="{0}" SortOrder="Ascending"></telerik:GridGroupByField>
                                    </SelectFields>
                                    <GroupByFields>
                                        <telerik:GridGroupByField FieldName="ToDoType"></telerik:GridGroupByField>
                                    </GroupByFields>
                                </telerik:GridGroupByExpression>
                                <telerik:GridGroupByExpression>
                                    <SelectFields>
                                        <telerik:GridGroupByField FieldName="ActivityDate"></telerik:GridGroupByField>
                                    </SelectFields>
                                    <GroupByFields>
                                        <telerik:GridGroupByField FieldName="Date" FormatString="{0:d}" SortOrder="Descending">
                                        </telerik:GridGroupByField>
                                        <telerik:GridGroupByField FieldName="ActivityDate" FormatString="{0:D}" SortOrder="None">
                                        </telerik:GridGroupByField>
                                    </GroupByFields>
                                </telerik:GridGroupByExpression>
                            </GroupByExpressions>
                            <Columns>
                                <telerik:GridTemplateColumn UniqueName="DateColumn" HeaderText="Date">
                                    <ItemStyle Width="75px" BorderStyle="None"></ItemStyle>
                                    <HeaderStyle Width="75px" HorizontalAlign="Center" />
                                    <ItemTemplate>
                                        <div>
                                        </div>
                                    </ItemTemplate>
                                </telerik:GridTemplateColumn>
                                <telerik:GridTemplateColumn UniqueName="TimeColumn" HeaderText="Time">
                                    <ItemStyle Width="125px" BorderStyle="None"></ItemStyle>
                                    <HeaderStyle Width="125px" HorizontalAlign="Center" />
                                    <ItemTemplate>
                                        <div>
                                            <%# DataBinder.Eval(Container.DataItem, "StartTime") %>
                                            <asp:Label ID="Label1" runat="server" Visible='<%# !Convert.IsDBNull(Eval("EndTime")) %>'>-</asp:Label>
                                            <%# DataBinder.Eval(Container.DataItem, "EndTime") %>
                                        </div>
                                    </ItemTemplate>
                                </telerik:GridTemplateColumn>
                                                               <telerik:GridTemplateColumn UniqueName="Location" HeaderText="Location">
                                    <ItemStyle Width="100px" BorderStyle="None"></ItemStyle>
                                    <HeaderStyle Width="100px" HorizontalAlign="Center" />
                                    <ItemTemplate>
                                        <div>
                                            <asp:Label ID="LabelLocation" runat="server" Text='<%# Eval("Location")%>'></asp:Label>
                                        </div>
                                    </ItemTemplate>
                                </telerik:GridTemplateColumn>
                                <telerik:GridTemplateColumn UniqueName="DueDate" HeaderText="Due Date">
                                    <ItemStyle Width="100px" BorderStyle="None"></ItemStyle>
                                    <HeaderStyle Width="100px" HorizontalAlign="Center" />
                                    <ItemTemplate>
                                        <div>
                                            <asp:Label ID="LabelDueDate" runat="server" Text='<%# Eval("DueDate")%>'></asp:Label>
                                        </div>
                                    </ItemTemplate>
                                </telerik:GridTemplateColumn>
                                <telerik:GridTemplateColumn UniqueName="Contact" HeaderText="Contact">
                                    <ItemStyle Width="100px" BorderStyle="None"></ItemStyle>
                                    <HeaderStyle Width="100px" HorizontalAlign="Center" />
                                    <ItemTemplate>
                                        <div>
                                            <asp:Label ID="LabelContact" runat="server" Text='<%# Eval("Contact")%>'></asp:Label>
                                        </div>
                                    </ItemTemplate>
                                </telerik:GridTemplateColumn>
                                <telerik:GridTemplateColumn UniqueName="Description" HeaderText="Description">
                                    <ItemStyle Width="125px" BorderStyle="None"></ItemStyle>
                                    <HeaderStyle Width="125px" HorizontalAlign="Center" />
                                    <ItemTemplate>
                                        <div>
                                            <asp:Label ID="LabelDescription" runat="server" Text='<%# Eval("Description")%>'></asp:Label>
                                        </div>
                                    </ItemTemplate>
                                </telerik:GridTemplateColumn>
                                <telerik:GridTemplateColumn UniqueName="Status" HeaderText="Status" Visible="false"
                                    DataField="Status" AllowFiltering="true">
                                    <ItemStyle Width="100px" BorderStyle="None"></ItemStyle>
                                    <HeaderStyle Width="100px" HorizontalAlign="Center" />
                                    <ItemTemplate>
                                        <div>
                                            <asp:Label ID="LabelStatus" runat="server" Text='<%# Eval("Status")%>'></asp:Label>
                                        </div>
                                    </ItemTemplate>
                                </telerik:GridTemplateColumn>
                                <telerik:GridTemplateColumn UniqueName="Type" HeaderText="Type" Visible="false"
                                    AllowFiltering="true" DataField="Type">
                                    <ItemStyle Width="100px" BorderStyle="None"></ItemStyle>
                                    <HeaderStyle Width="100px" HorizontalAlign="Center" />
                                    <ItemTemplate>
                                        <div>
                                            <asp:Label ID="LabelType" runat="server" Text='<%# Eval("Type")%>'></asp:Label>
                                        </div>
                                    </ItemTemplate>
                                </telerik:GridTemplateColumn>
                             
                                <telerik:GridTemplateColumn UniqueName="Company" HeaderText="Company" Visible="false">
                                    <ItemStyle Width="100px" BorderStyle="None"></ItemStyle>
                                    <HeaderStyle Width="100px" HorizontalAlign="Center" />
                                    <ItemTemplate>
                                        <div>
                                            <asp:Label ID="LabelEmployer" runat="server" Text='<%# Eval("Employer")%>'></asp:Label>
                                        </div>
                                    </ItemTemplate>
                                </telerik:GridTemplateColumn>
                                <telerik:GridTemplateColumn UniqueName="Phone" HeaderText="Phone" Visible="false">
                                    <ItemStyle Width="100px" BorderStyle="None"></ItemStyle>
                                    <HeaderStyle Width="100px" HorizontalAlign="Center" />
                                    <ItemTemplate>
                                        <div>
                                            <asp:Label ID="LabelPhone" runat="server" Text='<%# Eval("Phone")%>'></asp:Label>
                                        </div>
                                    </ItemTemplate>
                                </telerik:GridTemplateColumn>
                             
                                <telerik:GridBoundColumn DataField="ActivityID" Visible="false" UniqueName="ActivityID">
                                </telerik:GridBoundColumn>
                                <telerik:GridDateTimeColumn DataField="Date" AllowFiltering="true" Visible="false"
                                    DataFormatString="{0:MM/dd/yyyy}" UniqueName="Date">
                                </telerik:GridDateTimeColumn>
  
                            </Columns>
                            <HeaderStyle Width="125px" />
                            <CommandItemTemplate>
                                <asp:ImageButton ID="ImageButtonAdd" runat="server" ImageUrl="~/App_Themes/MLightning/Layout/plus-icon.png"
                                    AlternateText="Add" PostBackUrl="~/Calendar/CalendarActivityAddSettings.aspx" /> 
                                <asp:LinkButton ID="LinkButtonExport" runat="server" CommandName="ExportToPdf" CausesValidation="false">
                                    <img style="border:0px;vertical-align:middle;" alt="" src="../App_Themes/MLightning/Layout/Reader.gif" />
                                    <span class="printTop" > Export</span>
                                </asp:LinkButton>  
                            </CommandItemTemplate>
                            <PagerStyle Position="TopAndBottom" PrevPageText="Prev" NextPageText="Next" Mode="NextPrev" />
                        </MasterTableView>
                    </telerik:RadGrid>

No answers yet. Maybe you can help?

Tags
Grid
Asked by
newbie
Top achievements
Rank 1
Share this question
or