HOW TO REMOVE DEFAULT ROW IN WPF DATA GRID

Samuel Fernandes

Total Post:159

Points:1117
Posted by  Samuel Fernandes
WPF 
WPF
 1877  View(s)
Ratings:
Rate this:

I am using a WPF Data Grid. Whenever it is loaded there is a blank default row. How can I disable the default row from appearing like you can in the Windows Forms grid.

  1. Sumit Kesarwani

    Post:378

    Points:2694
    Re: How to Remove Default Row In Wpf data Grid

    Hi Samuel,


    This is the row for new entries. If you don't want let the user create new entries or if you handle this from code, e.g. with a add-button, disable the CanUserAddRows-option.

    <DataGrid  CanUserAddRows="False" />

Answer

NEWSLETTER

Enter your email address here always to be updated. We promise not to spam!