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 edit


Posted Date: 03 Mar 2008      Total Responses: 3

Posted By: gavas       Member Level: Gold     Points: 2


Hi friends,


I'm using .net 2005, How to edit a datagrid record in vb.net...




Responses

Author: sujit kumar biswal    03 Mar 2008Member Level: GoldRating:     Points: 2
Protected Sub GridView1_RowEditing(ByVal sender As Object, ByVal e As GridViewEditEventArgs)
GridView1.EditIndex = CInt(e.NewEditIndex)
BindGrid()
End Sub


Author: Mohan Kumar    03 Mar 2008Member Level: DiamondRating:     Points: 2
hi,

use Editmode property.


for more details pls go throug this link.
http://msdn2.microsoft.com/en-us/library/system.windows.forms.datagridview.editmode.aspx


Author: Er. Ram Singh    03 Mar 2008Member Level: GoldRating:     Points: 2
public void Grid()
{
SqlConnection con = new SqlConnection("server=. ; integrated security=sspi; database = pubs");
con.Open();
SqlDataAdapter da = new SqlDataAdapter("select * from RAM", con);
//SqlDataReader dr = com.ExecuteReader();
DataSet ds= new DataSet();
da.Fill(ds, "RAM");
GridView1.DataSource = ds;
GridView1.DataBind();
}



protected void GridView1_RowEditing(object sender, GridViewEditEventArgs e)
{
GridView1.EditIndex = e.NewEditIndex;

Grid();
}

protected void GridView1_RowCancelingEdit(object sender, GridViewCancelEditEventArgs e)
{
GridView1.EditIndex = -1;

Grid();

}



Post Reply
You must Sign In to post a response.
Next : Could u Tell me the site for xml
Previous : upgrade version of product-Very interesting
Return to Discussion Forum
Post New Message
Category: .NET

Related Messages



dotNet Slackers   BizTalk Adaptors    Web Design

conference calls

Contact Us    Privacy Policy    Terms Of Use