Good day,
I have a problem inserting a data or a text from textbox in a specific column and a specific row in datagridview without database using add button.
I have a code her but the problem of this code it insert string text in all the column selected.
I want only one row in a specific column should be inserted...please help..thank
for (int i = 0; i < DatagridVoucher.Rows.Count; i++)
{
DataGridViewRow row = DatagridVoucher.Rows[i];
row.Cells[3].Value = this.txtVat.Text;
}
I'm attaching file for more details thank you .


Midhun TpRank #388 · 6.5K reputationPosted Aug 4, 2017, 9:27 PM EDT
Satyaprakash SamantarayRank #101 · 21.1K reputationPosted Aug 4, 2017, 2:11 AM EDT
Gokhul VarmanRank #1,505 · 1.1K reputationPosted Aug 4, 2017, 5:07 AM EDT
Bhuvanesh MohankumarRank #310 · 8.1K reputationPosted Aug 4, 2017, 9:31 AM EDT
Black Diamond191 reputationPosted Aug 4, 2017, 5:41 PM EDT
Black Diamond191 reputationPosted Aug 4, 2017, 11:42 PM EDT
{
DatagridVoucher.Rows[RowIndex].Cells[3].Value = txtVat.Text;
}