Advertisement

10.28.2007 at 11:04PM PDT, ID: 22923764
[x]
Attachment Details

Basic GridView Updating

Asked by Kelvin81 in Programming for ASP.NET, C# Programming Language, WebApplications

Tags: gridview, updating

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.ASEOLEDBProvider.2;Data Source=DSRFCLDD02;Initial Catalog=SDAPSLDN5;Password=XXXXXXX;User ID=XXXXXXXXX";
            System.Data.OleDb.OleDbDataAdapter da = new System.Data.OleDb.OleDbDataAdapter("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.

KelvinStart Free Trial
[+][-]10.28.2007 at 11:18PM PDT, ID: 20167827

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]10.28.2007 at 11:18PM PDT, ID: 20167829

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]10.29.2007 at 12:23AM PDT, ID: 20167966

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]10.29.2007 at 12:31AM PDT, ID: 20167979

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]10.29.2007 at 12:41AM PDT, ID: 20167992

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]10.29.2007 at 01:22AM PDT, ID: 20168082

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]10.29.2007 at 01:59AM PDT, ID: 20168147

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zones: Programming for ASP.NET, C# Programming Language, WebApplications
Tags: gridview, updating
Sign Up Now!
Solution Provided By: digitalZo
Participating Experts: 1
Solution Grade: A
 
 
[+][-]10.29.2007 at 02:22AM PDT, ID: 20168209

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]10.29.2007 at 02:52AM PDT, ID: 20168291

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]10.29.2007 at 03:03AM PDT, ID: 20168326

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
 
Loading Advertisement...
20080716-EE-VQP-32 / EE_QW_2_20070628