C# Tutorials and offshore development in India
    Tutorials   Resources   Forum   Communities   Interview   Jobs   Projects   Offshore Development    
Silverlight Tutorials | Mentor | Code Converter | Articles | Code Factory | Computer Jokes | Members | Peer Appraisal | IT Companies | Bookmarks | Revenue Sharing |


Prizes & Awards
My Profile



Active Members
TodayLast 7 Days more...

New Feature: Community Sites: Create your own .NET community website and start earning from Google AdSense ! It's Free !




datagrid


Posted Date: 20 Aug 2007      Total Responses: 2

Posted By: pallavi satish punekar       Member Level: Gold     Points: 2


i have created a datagrid with footertemplate .
i have textbox in the footertemplate
when i click on button i wan to retrive the data entered in that footertemplet textbox my button is nt in grid




Responses

Author: Ashutosh    20 Aug 2007Member Level: GoldRating:     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 2007Member Level: BronzeRating:     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.


Post Reply
You must Sign In to post a response.
Next : how to deploy business layer services
Previous : wat is Generics?
Return to Discussion Forum
Post New Message
Category: .NET

Related Messages



dotNet Slackers   BizTalk Adaptors    Web Design

UK Conference calling Company

Contact Us    Privacy Policy    Terms Of Use