Hi,
I have scoured the net, and cannot find exactly what I am looking for. I am trying to find a step by step tutorial, on how to simply update a gridview that is pulling data from a Sybase database.
protected void Button2_Click(object sender, EventArgs e)
{
string strConn = "Provider=Sybase.ASEOLEDBP
rovider.2;
Data Source=DSRFCLDD02;Initial Catalog=SDAPSLDN5;Password
=XXXXXXX;U
ser ID=XXXXXXXXX";
System.Data.OleDb.OleDbDat
aAdapter da = new System.Data.OleDb.OleDbDat
aAdapter("
Select top 50 * from users", strConn);
DataTable dt = new DataTable();
da.Fill(dt);
GridView1.DataSource = dt;
GridView1.DataBind();
}
That being said, I do not have any preset columns except for autogeneration of Edit and Select buttons in the GridView.
At first I was getting an error while attempting to hit the edit button that it was an unhandled event, but after adding the RowEditing event, it stopped doing anything at all.
I realize that I didn't add any code to the event, I just created an empty one, but can you guys help me out with what code goes in there. A coworker binding to a datasource was showing me how the row automatically changed to text boxes.
Like I said, a tutorial would be very helpful, or any direct input that you guys could give me with solving this problem.
Thanks in advance for all of your help.
Kelvin
Start Free Trial