none
Remove border in Datagrid

    Question

  • hello everbody first of all

    i want to get rid of border in Datagrid.how can i do that in wpf

    Wednesday, May 11, 2011 1:20 PM

Answers

  • If you do not want to re-template your datagrid, you could change the line color to the background of your datagrid, for example:

    <Window.Resources>

        <SolidColorBrush x:Key="GridLine" Color="White" />

    </Window.Resources>

     

    <DataGrid Name="myDataGrid" VerticalGridLinesBrush="{StaticResource GridLine}"

            HorizontalGridLinesBrush="{StaticResource GridLine}"  ItemsSource="{Binding}">

    You will not see the column lines. 


    Sheldon _Xiao[MSFT]
    MSDN Community Support | Feedback to us
    Get or Request Code Sample from Microsoft
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    • Marked as answer by biçer Friday, May 13, 2011 8:37 AM
    • Unmarked as answer by biçer Friday, May 13, 2011 8:38 AM
    • Marked as answer by biçer Friday, May 13, 2011 8:38 AM
    Thursday, May 12, 2011 12:05 PM

All replies