Cabghe "Grouping" style

3 posts, 0 answers
  1. lupotana
    lupotana avatar
    73 posts
    Member since:
    Nov 2006

    Posted 28 Nov 2011 Link to this post

    Hi,
    I've the graphic request for the grid in modality "Grouping",
     
    1) (Red Double-Arrows in attached image)
      I would resize the width of GridGroupSplitterColumn. How do I do ?

    2) (Green Double-Arrows in the attached image)
      I would resize the space beetween the start of detail and the first GridGroupByField

    3) (Blue Circle in the attached image)
      I would hide the FieldAlias.
     
    <telerik:GridGroupByField FieldName="INFO_GAME" FieldAlias="»" HeaderValueSeparator=" ">                                           </telerik:GridGroupByField>

    Thanks a lot,
    Marco
  2. lupotana
    lupotana avatar
    73 posts
    Member since:
    Nov 2006

    Posted 01 Dec 2011 Link to this post

    No idea ? :-(
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Pavlina
    Admin
    Pavlina avatar
    6084 posts

    Posted 01 Dec 2011 Link to this post

    Hello Lupotana,

    Straight to your questions:

    1) To change the GroupSplitterColumn width you can handle on ColumnCreated server side event and set the desired width:
    protected void RadGrid1_ColumnCreated(object sender, GridColumnCreatedEventArgs e)
    {
        if (e.Column is GridGroupSplitterColumn)
        {
            e.Column.HeaderStyle.Width = Unit.Pixel(10);
        }
    }

    2) To resize this space you could remove the paddings as shown below:
    <style type="text/css">
            .RadGrid .rgGroupHeader td
            {
                padding-left: 0 !important;
                padding-right: 0 !important;
            }
        </style>

    3) To hide the FieldAlias you can try the following code:
    protected void RadGrid1_ItemDataBound(object sender, GridItemEventArgs e)
       {
           if (e.Item is GridGroupHeaderItem)
           {
               GridGroupHeaderItem groupHeader = (GridGroupHeaderItem)e.Item;
               {
                   groupHeader.DataCell.Text = groupHeader.DataCell.Text.Split(':')[1].ToString();
               }
           }
       }

    Regards,
    Pavlina
    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
Back to Top