How to update datagrid using text boxes
I am using Visual Studio and I am trying to update my datagrid using the info from text boxes rather than using the binding navigator to directly input the information. I was hoping that I can fill in the fields with the info and click a button to update my datagrid. Is this possible? If so how?
1 Answer
Know the answer? Post it. Somebody with the same question will find it here.
Bechir BejaouiRank #144 · 15.9K pointsPosted Dec 9, 2008, 2:21 PM EST
datagridview[columnIndex,rowindex].Value = textBox.Text;
example:
textBox.Text = "Maria";
datagridview[0,0].Value = textBox.Text;
this couple of lines will put Maria in the first datagridviewcell