In the .cs page the rows are added as: TableRow tr = new TableRow(); TableCell tcPlace = new TableCell(); Label lblPlaces = new Label(); lblPlaces.Attributes.Add("runat", "server"); lblPlaces.ID = "lblPlaces" + i; lblPlaces.Text = arrstrPlaces[i]; tcPlace.Controls.Add(lblPlaces); tr.Cells.Add(tcPlace); TableCell tcRate = new TableCell(); TextBox txtRates = new TextBox(); txtRates.Attributes.Add("runat","server"); txtRates.ID = "txtRates" + i; txtRates.Width = 50; txtRates.Attributes.Add("onkeypress", "fnAccpNumDecimal(event)"); tcRate.Controls.Add(txtRates); tr.Cells.Add(tcRate); TableCell tcrfv_FD = new TableCell(); RequiredFieldValidator rfv_FD = new RequiredFieldValidator(); rfv_FD.Attributes.Add("runat", "server"); rfv_FD.ID = "rfv_FD" + i.ToString(); rfv_FD.ControlToValidate = txtRates.ID; rfv_FD.ErrorMessage = "Insert Rates"; rfv_FD.Display = ValidatorDisplay.Dynamic; rfv_FD.SetFocusOnError = true; rfv_FD.Text = "*"; rfv_FD.EnableClientScript = true; rfv_FD.ValidationGroup = "check"; rfv_FD.Visible = true; rfv_FD.Enabled = true; rfv_FD.EnableViewState = true; tcrfv_FD.Controls.Add(rfv_FD); tr.Cells.Add(tcrfv_FD); tblRateDetails.Rows.Add(tr);
modified on Monday, April 13, 2009 5:40 AM