SNo Name Address 1 kerrthi hyderabad
TextBox tb = new TextBox(); RequiredFieldValidator rfv = new RequiredFieldValidator(); tb.Text = string.Empty; if (grvInsuranceDetails.HeaderRow.Cells[i].Text == "IE_VECHICLE_MAP") { tb.Enabled = false; tb.Text = ViewState["IE_Vehiclecode"].ToString(); } tb.ID = "txtbox" + i.ToString(); rfv.ID = "rfvvalid" + i.ToString(); rfv.ControlToValidate = tb.ID; rfv.ErrorMessage = "*"; rfv.ForeColor = System.Drawing.Color.Red; rfv.ValidationGroup = "required"; tb.Style.Add("Width", "120px"); tb.Style.Add("Height", "15px"); tb.Attributes.Add("runat", "Server"); //c.Controls.Clear(); //c.RowSpan grdviewvechicleDetails.Controls.Add(tb); c.Controls.Add(tb); c.Controls.Add(rfv); i++;
foreach (GridViewRow grv in grvInsuranceDetails.Rows) { int i = 0; TextBox txt = (TextBox)grv.FindControl("txtbox1"); foreach (TableCell c in grv.Cells) { TextBox txt1 = (TextBox)c.FindControl("txtbox0"); string grdid = grvInsuranceDetails.Rows[grv.RowIndex].Cells[i].Text.ToString().TrimEnd(); i++; } }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)