WPF: New Row on Datagrid that bind to custom class -


i created custom data container class onpropertychanged event , observablecollection , bind datagrid in wpf. the problem everytime program start, datagrid automatically creates new row @ bottom. new row not present in observablecollection editing useless, adding new item programmatically in observablecollection erase data in new row.

how can disable new row or make observablecollection updated if user start editing in new row (just in sql server management studio)?

nb: if can please give me example of "correct" custom class in wpf, i'm still in wpf.

meleak's answer comment:

if want disable users can add new rows set canuseraddrows="false" in datagrid. newitemplaceholder empty row, inserted observablecollection upon commit.


Comments

Popular posts from this blog

java - netbeans "Please wait - classpath scanning in progress..." -

python - Scipy curvefit RuntimeError:Optimal parameters not found: Number of calls to function has reached maxfev = 1000 -

java - where to store the user credentials in an enterprise application(EAI)? -