Adding extra row at the end of datatable when linking to datagridview
I am creating datatable as
DataTable dtVndDtl = new DataTable();
dtVndDtl.Columns.Add("prvn_Id");
dtVndDtl.Columns.Add("vend_Name");
dtVndDtl.Columns.Add("vend_Id");
dtVndDtl.Columns.Add("prvn_Price");
and adding to datagridview like
dgvPrdtRws.DataSource = dtVndDtl;
I have set datapropertynames as well .. I am adding rows to datagridview. when i click the save button my data should be saving data from the database. But I get an extra blank line, in the end my lines. Why is this happening. I don't want to add this last line .. so help me
+3
user1982736
source
to share
2 answers