5
Contributors
8
Replies
9
Views
9 Years
Discussion Span
Last Post by o_shawky
0

DGV.Rows.add();

But if the datagrid is binded you need to add the row to the datasource, NOT in the DGV

DataTable.rows.add();

0
DGV.Rows.add();

But if the datagrid is binded you need to add the row to the datasource, NOT in the DGV

DataTable.rows.add();
0

Could I enquire as to why you would want to do this? Give this a try:

datagrid1.Rows.Add(new object[]{null,null});

I am not sure if this will work but give it a try - let me know how it goes!

0

Thank you to all for your answers.
My datagrid is binded to an object.
I am adding an new empty collection to the object before to bind it to the datagrid.
I have a new empty row into my datagrid, but now the problem is that the id the item is null and I cannot update or delete it.

Can you help me with that?

Thank you!

0

Hooraay , I added a new object on Update and Delete procedures and now it works fine.
Thank you for your replay!

0

What object ?
What Id
What code

Difficult to say anything without a little more details ..

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.