Deepak jena

Deepak jena

  • NA
  • 45
  • 1.6k

about gridview inside textbox

Apr 6 2017 3:33 AM
Hello Sir,
 
I want assign  1 when one data add in gridview.in quantity text will show 1.
please sir give me the solution .
 
 
protected void GridView1_RowDataBound(object sender, GridViewRowEventArgs e)
/{
  if (e.Row.RowType == DataControlRowType.DataRow)
  {
TextBox t = (TextBox)e.Row.FindControl("txtqunty");
t.Text = Convert.ToInt32(1).ToString();} 
 
i used this code but got error like reference object not set.
here  i am atteach a file sir please check it.
In this red place i want 1 when add 1st value.
 

Attachment: Capture2.rar

Answers (2)