Reputation: 29
Hi guys I was wondering how can I check if DataGridView
has a new row when i click on Add Button. Note that, I'm using BindingManagerBase
to bind DataGridView
with TextBoxes
.
I tried this code :
bool Is_Empty = false;
for (int i = 0; i < dataTable.Columns.Count; i++)
{
if (dataTable.Rows[dataTable.Rows.Count - 1].IsNull(i))
Is_Empty = true;
}
if (Is_Empty == false)
BindingManagerBase.AddNew();
Upvotes: 0
Views: 72