1.11M Members

How to get textbox value in gridview

 
0
 

i have a gridview with a text box in it, i understand that i can use CommandArgument='<%# Eval("MyGridViewData")%>' to get the data in the gridview.. But i have no idea how to get the textbox value inside the gridview .. Can anyone help me? :(

 
0
 

Hi

I dont know in which event you are trying to this? But if it is a grid related event you can use findControl or BindingContainer to retreive textbox Value

 
1
 

The row and cell index's are dependent on which row and cell you want to store the value:

This is for the first cell of the first row

dataGridView.Rows[0].cells[0].value = textBox1.Text;
You
This article has been dead for over six months: Start a new discussion instead
Post:
Start New Discussion
Tags Related to this Article