I have unbound DGV and I want to delete its unwanted last line on the DGV Leave event hander . How to do this ?. I know that DGV has to programmatically add new rows and set property AllowUserToAddRows = false. But I have a question: Is it possible to extract the last line without permission of DGV property? USeriododdroz = false? OR Set DataGridView However, you must provide a method that will allow the user to enter a new line. For example, you can see that when users double-click the Data Grid view, you set AllowUserToAddRows to True. And then when they make edits, you put the value back to false. To add a new row: Say your datagroup view has a myadatgrid view and you have a button called BTNADROV and when the button clicks , It adds a new row to your datagrid view. Alternatively, you can only handle DataGridView Is it possible to remove unlimited new lines of DGV?
AllowUserToAddRows property to
False .
Private Zero btnAddRow_Click (Object Sender, RoutedEventArgs e) {// Add an empty row MyDataGridView.Rows.Add (); }
OnDoubleClick events in which you can type
MyDataGridView.Rows.Add () Can call new line
Comments
Post a Comment