This is the LAST major issue that I would really appreciate help on.
Once this last issue is resolved, my project would be done.
I want to take this opportunity to thank Indresh for kindness in helping me get to this stage of this huge problem.
Just to recap, we have GridView and Repeater both allow users to dynamically add additonal rows.
This works.
When a user enters a registration number in Gridview and clicks Next to go to Repeater, the registration number entered in Gridview automatically populates a box in Repeater.
This works.
If for instance, two registrations are entered in Gridview, in Repeater two sections are generated in Repeater.
Each section with representating a Registration #.
Again,because of Indresh, this works.
The issue that i am having right now is that on the preview page, it doesn't matter how many registration numbers or how many sections, the preview page shows only one section with one registration number.
Is there something I can change in the code below to allow for each registration number to generate a section based on that registration number?
Please let me know if I need to clarify.
Thanks so much.
public DataTable dtAirInfoTable;
private void FillSummary()
{
//preview of total tax return year
lblTotal.Text = hfvalue.Value;
//Show Payer summary info
lblAcctNo.Text = accountnumber.Text;
lblTaxYr.Text = txtTaxYr.Text;
lblOwnerPhone.Text = txtOwnerPhone.Text;
lblDueDate.Text = txtDueDate.Text;
lblfName.Text = txtfname.Text;
lblfAddress.Text = txtfaddress.Text;
lblfCity.Text = txtfcity.Text;
lblfStates.Text = ddlstates.SelectedItem.ToString();
lblfZip.Text = txtfzip.Text;
//lblsitus.Text = rblsitus.SelectedItem.ToString();
lblcitylist.Text = citylist.Text;
lblTotalPrev.Text = lblTotal.Text;
//If Address is different
if (same_as_taxpayeraddr.Checked == true)
{
chksameAddr.Checked = true;
lblfullName.Text = txtfullname.Text;
lblAddress.Text = txtaddress.Text;
lblCity.Text = txtcity.Text;
lblStates.Text = ddlfillstates.SelectedItem.ToString();
lblZip.Text = txtzip.Text;
}
else
{
chksameAddr.Checked = false;
lblfullName.Text = "";
lblAddress.Text = "";
lblCity.Text = "";
lblStates.Text = "";
lblfZip.Text = "";
}
lblTotalPrev.Text = hfvalue.Value;
if (ViewState["TempData"] != null)
{
dtAirInfoTable = (DataTable)ViewState["TempData"];
}
int rowIndex = 0;
if (ViewState["CurrentTable"] != null)
{
//Initialize datatable.
DataTable ctable = ViewState["CurrentTable"] as DataTable;
//Lets start looping through the second datatable for aircraft schedule info. .
if (ctable.Rows.Count > 0)
{
for (int i = 1; i <= Repeater2.Items.Count; i++)
{
lblAircraftCity.Text = ((TextBox)Repeater2.Items[rowIndex].FindControl("aircraftCity")).Text;
lblAircraftcnty.Text = ((TextBox)Repeater2.Items[rowIndex].FindControl("aircraftcnty")).Text;
lAblircraftstate.Text = ((DropDownList)Repeater2.Items[rowIndex].FindControl("aircraftstate")).SelectedItem.Text;
lblARegNo.Text = ((TextBox)Repeater2.Items[rowIndex].FindControl("aRegNo")).Text;
lblAMake.Text = ((TextBox)Repeater2.Items[rowIndex].FindControl("aMake")).Text;
lblAModelNo.Text = ((TextBox)Repeater2.Items[rowIndex].FindControl("aModelNo")).Text;
lblAYRBuilt.Text = ((TextBox)Repeater2.Items[rowIndex].FindControl("aYRBuilt")).Text;
lblASN.Text = ((TextBox)Repeater2.Items[rowIndex].FindControl("aSN")).Text;
lblDatePurchased.Text = ((TextBox)Repeater2.Items[rowIndex].FindControl("txtdatePurchased")).Text;
lblPurchType.Text = ((RadioButtonList)Repeater2.Items[rowIndex].FindControl("rblPurchaseType")).SelectedValue;
lblFNamePrev.Text = ((TextBox)Repeater2.Items[rowIndex].FindControl("txtPrevOnwerName")).Text;
lblAddrPrev.Text = ((TextBox)Repeater2.Items[rowIndex].FindControl("txtprevAddr")).Text;
lblCityPrev.Text = ((TextBox)Repeater2.Items[rowIndex].FindControl("txtprevCity")).Text;
Label1.Text = ((DropDownList)Repeater2.Items[rowIndex].FindControl("ddlPrevState")).SelectedItem.Text;
lblZipPrev.Text = ((TextBox)Repeater2.Items[rowIndex].FindControl("txtprevzip")).Text;
lblPurchOnwer.Text = ((TextBox)Repeater2.Items[rowIndex].FindControl("txtbuyername")).Text;
lblPurcAddr.Text = ((TextBox)Repeater2.Items[rowIndex].FindControl("txtbuyeraddress")).Text;
lblPurcCity.Text = ((TextBox)Repeater2.Items[rowIndex].FindControl("txtbuyercity")).Text;
Label4.Text = ((DropDownList)Repeater2.Items[rowIndex].FindControl("lblbuyerstate")).SelectedItem.Text;
lblPurcZip.Text = ((TextBox)Repeater2.Items[rowIndex].FindControl("txtbuyerzip")).Text;
lblDdatesold.Text = ((TextBox)Repeater2.Items[rowIndex].FindControl("txtdatesold")).Text;
lblSalePrice.Text = ((TextBox)Repeater2.Items[rowIndex].FindControl("txtsalePrice")).Text;
lblDescription.Text = ((TextBox)Repeater2.Items[rowIndex].FindControl("txtDescription")).Text;
lblavionics.Text = ((TextBox)Repeater2.Items[rowIndex].FindControl("txtavionics")).Text;
Label3.Text = ((RadioButtonList)Repeater2.Items[rowIndex].FindControl("rblIssues")).SelectedValue;
lblfunctionalIsses.Text = ((TextBox)Repeater2.Items[rowIndex].FindControl("functionalIsses")).Text;
lblAircraftCost.Text = ((TextBox)Repeater2.Items[rowIndex].FindControl("aircraftCost")).Text;
lblHrsBtwnTBO.Text = ((TextBox)Repeater2.Items[rowIndex].FindControl("hrsBtwnTBO")).Text;
lblHrsOverhaul.Text = ((TextBox)Repeater2.Items[rowIndex].FindControl("hrsOverhaul")).Text;
lblOverhaul.Text = ((RadioButtonList)Repeater2.Items[rowIndex].FindControl("rbllastOverHaul")).SelectedValue;
lblTotOnAirFrm.Text = ((TextBox)Repeater2.Items[rowIndex].FindControl("TotOnAirFrm")).Text;
}
}
}