Quantcast
Channel: Windows Presentation Foundation (WPF) forum
Viewing all articles
Browse latest Browse all 18858

New row getting added to the DataGrid even when the users don't enter any data

$
0
0
I have a WPF data grid which will be populated with some existing data on screen load. The user can also add new rows in the grid. To enter the value for the new row I will be double clicking the cell to enter values. When I enter the values and take the focus out of the current row a new row should gets created and along with that a blank row will be created for the user to enter another row. That is fine. However when I double click a cell in a row and don't enter values and move the focus out of the row then also a blank row is getting created.

I don't want this blank row to be created when the user does not enter any values. The blank row should only get created when the user enters any value for the row.

I have set the below properties for the grid to true.
CanUserAddNewRows, CanUserDeleteRows and CanUserPasteToNewRows

Can you please help me on this?
  

Viewing all articles
Browse latest Browse all 18858

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>