hello all,

Iam using a gridview which is bounded with datatable. There is also need to have a edit button which is used to edit quantity (textBox) in the data table.
I want to edit only Quantity not all columns. So anyone please guide me that how I can do this and what coding should be done for edit button?

I have done the following coding for creating a datatable

DataTable dt=new DataTable();
                    dt.Columns.Add("SkuNo.");
                    dt.Columns.Add("Name");
                    dt.Columns.Add("Size");
                    dt.Columns.Add("Price in $");
                    dt.Columns.Add("[B]Quantity[/B]");
                    dt.Columns.Add("Extended Price in $");
                    dt.Columns.Add("Description");
                    dt.Rows.Add(ItemsRow);//ItemsRow is an array which is initialized by me.
                        Session["MyShoppingCart"] = dt;

And Gridview is binded by:-

GridView1.DataSource = (DataTable)Session["MyShoppingCart"];
        GridView1.DataBind();

Thanks.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.