I followed your instructions but have error
qty is not null when i am using textbox it is working fine but when i used label then it is giving error
Object reference not set to an instance of an object.
Line 333:
Line 334: TextBox lbl1 = (TextBox)e.Row.FindControl("QTY");
Line 335: TotalValue1 += Convert.ToDecimal(lbl1.Text);
Line 336: }
Line 337: else if (e.Row.RowType == DataControlRowType.Footer)
on below link
I am doing column total of qty
protected void GridView1_RowDataBound(object sender, GridViewRowEventArgs e)
{
if (e.Row.RowType == DataControlRowType.DataRow)
{
TextBox lbl1 = (TextBox)e.Row.FindControl("QTY");
TotalValue1 += Convert.ToDecimal(lbl1.Text);
}
else if (e.Row.RowType == DataControlRowType.Footer)
{
Label lb1 = (Label)e.Row.FindControl("lblTotal1");
lb1.Text = TotalValue1.ToString();
txtconqty.Text = TotalValue1.ToString();
}
///disable qty textbox
if (e.Row.RowType == DataControlRowType.DataRow)
{
TextBox txtqtygv = (e.Row.FindControl("qty") as TextBox);
txtqtygv.Enabled = true;
}