0

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.

2
Contributors
1
Reply
2
Views
9 Years
Discussion Span
Last Post by a_shym41
This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.