Space between columns

4 posts, 0 answers
  1. John
    John avatar
    60 posts
    Member since:
    Nov 2006

    Posted 16 Aug 2013 Link to this post

    Is there a way with the grid to put a small space between 2 columns?  
    i thought about maybe putting a dummy column there and then somehow remove the header for that column.  is there a better way?

    see the attached example for what i want. 

    Thanks!
  2. Dimitar
    Admin
    Dimitar avatar
    1414 posts

    Posted 21 Aug 2013 Link to this post

    Hello John,

    Thank you for writing.

    Just to clarify, I am assuming that you are asking about RadGridView not RadPageView as the thread is opened in the RadPageView section. 

    You can achieve the desired effect very easy just set the CellSpacing property like this:
    radGridView1.GridElement.CellSpacing = 10;

    I hope this will be useful. Should you have further questions, I would be glad to help.

    Regards,
    Dimitar
    Telerik
    TRY TELERIK'S NEWEST PRODUCT - EQATEC APPLICATION ANALYTICS for WINFORMS.
    Learn what features your users use (or don't use) in your application. Know your audience. Target it better. Develop wisely.
    Sign up for Free application insights >>
  3. UI for WinForms is Visual Studio 2017 Ready
  4. Phillip
    Phillip avatar
    7 posts
    Member since:
    May 2016

    Posted 11 May in reply to Dimitar Link to this post

    I have a MVVM project: Is there a way to set CellSpacing in WPF?

    Do I need a template for this?

    <telerik:RadGridView.Columns>
        <telerik:GridViewDataColumn Header="{Loc Key=PREISLISTE_ABMENGE_ALT}" DataMemberBinding="{Binding Path=AbMengeAlt}" IsFilterable="False"/>
        <telerik:GridViewDataColumn Header="{Loc Key=PREISLISTE_RABATT_ALT}" DataMemberBinding="{Binding Path=RabattAlt}" IsFilterable="False"/>
        <telerik:GridViewDataColumn Header="{Loc Key=PREISLISTE_WERT_ALT}" DataMemberBinding="{Binding Path = WertAlt}" IsFilterable="False"/>
                       <!--Here I Need A Spacing!-->                
        <telerik:GridViewDataColumn Header="{Loc Key=PREISLISTE_ABMENGE}" DataMemberBinding="{Binding Path=AbMenge}" IsFilterable="False"/>
        <telerik:GridViewDataColumn Header="{Loc Key=PREISLISTE_RABATT}" DataMemberBinding="{Binding Path=Rabatt}" IsFilterable="False"/>
        <telerik:GridViewDataColumn Header="{Loc Key=PREISLISTE_WERT}" DataMemberBinding="{Binding Path = Wert}" IsFilterable="False"/>
    </telerik:RadGridView.Columns>
    </telerik:RadGridView>

  5. Dimitar
    Admin
    Dimitar avatar
    1414 posts

    Posted 12 May Link to this post

    Hello Phillip,

    Thank you for writing.

    Note that this forum is related to the Telerik UI for WinForms product. Please post any questions regarding WPF in the relevant forum: http://www.telerik.com/forums

    I hope this information helps.
     
    Regards,
    Dimitar
    Telerik
    Do you need help with upgrading your AJAX, WPF or WinForms project? Check the Telerik API Analyzer and share your thoughts.
Back to Top