| Author: Ashutosh 20 Aug 2007 | Member Level: Gold | Rating: Points: 2 |
Hi Try this code DataGrid1 ==>Assume the name of the datagrid TextBox1 ==>Assume the name of the Textbox
Private Sub DataGrid1_ItemDataBound(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.DataGridItemEventArgs) Handles DataGrid1.ItemDataBound Dim l_Textbox As TextBox Try l_Textbox = e.Item.FindControl("TextBox1")
If (Not l_Textbox Is Nothing) Then //ur code here End If
Catch ex As Exception //ur exception here End Try End Sub I hope this will help you. - Regards Ashutosh
|
| Author: Senthil Selvan 20 Aug 2007 | Member Level: Bronze | Rating: Points: 2 |
Hi friend, I tried with gridview and it is working. so you can change this to datagrid .
protected void Button1_Click(object sender, EventArgs e) { GridViewRow row = gv1.FooterRow; if (row.RowType == DataControlRowType.Footer) { TextBox txtname = (System.Web.UI.WebControls.TextBox)row.FindControl("txtNam"); Response.Write(txtname .Text); } }
regards, Senthilselvan.D senthilselvan.d@hotmail.com (Please let me know , if u come to know any openings in your company for 1+) Thanks.
|