Hi,
if you want to set the value for datagridview1 from textbox , use the below code
DatagridView[RowNo, CellNo].Value = Textbox.Text;