Click here to Skip to main content
15,867,594 members
Home / Discussions / ASP.NET
   

ASP.NET

 
GeneralRe: Repeater2 is not getting populated with data from Repeater2. Any ideas? Pin
Richard Deeming21-Sep-17 7:32
mveRichard Deeming21-Sep-17 7:32 
GeneralRe: Repeater2 is not getting populated with data from Repeater2. Any ideas? Pin
samflex21-Sep-17 8:32
samflex21-Sep-17 8:32 
GeneralRe: Repeater2 is not getting populated with data from Repeater2. Any ideas? Pin
Richard Deeming21-Sep-17 8:55
mveRichard Deeming21-Sep-17 8:55 
GeneralRe: Repeater2 is not getting populated with data from Repeater2. Any ideas? Pin
samflex21-Sep-17 9:39
samflex21-Sep-17 9:39 
GeneralRe: Repeater2 is not getting populated with data from Repeater2. Any ideas? Pin
Richard Deeming21-Sep-17 9:47
mveRichard Deeming21-Sep-17 9:47 
GeneralRe: Repeater2 is not getting populated with data from Repeater2. Any ideas? Pin
samflex21-Sep-17 10:03
samflex21-Sep-17 10:03 
GeneralRe: Repeater2 is not getting populated with data from Repeater2. Any ideas? Pin
Richard Deeming22-Sep-17 1:52
mveRichard Deeming22-Sep-17 1:52 
GeneralRe: Repeater2 is not getting populated with data from Repeater2. Any ideas? Pin
samflex22-Sep-17 3:29
samflex22-Sep-17 3:29 
Thank you very sir.

I truly appreciate your patience.

SetPreviousData2 takes two arguments, RegisterNumber( to populate MarineRegNo from Repeater1 to AregNo for Repeater2) and bregisterNumber which populates VesselRegNo from Repeater1 to coastGuardNumber for Repeater2) when user clicks the NEXT button.

When SetPreviousData2(registerNumber, bregisterNumber) is called, I get an error that method must have a return type.

I suspect that those two arguments may no longer be needed given the solution you have given me.

However, even after I remove them from SetPreviousData2(...) method and I remove them from where it is called, I still get that error.

Here is where it is called as well as the method and just to avoid me coming to ask more questions, I think and please confirm that if in fact, it is no longer needed, then any place else on the page where they are referenced, I will remove them?

PHP
    //Set Previous Data on Postbacks
    SetPreviousData2(registerNumber, bregisterNumber);


private void SetPreviousData2(string registerNumber, string bregisterNumber)
{
    int rowIndex = 0;
    if (ViewState["CurrentTable"] != null)
    {
        DataTable dt = (DataTable)ViewState["CurrentTable"];

        if (dt.Rows.Count > 0)
        {
            for (int i = 0; i < dt.Rows.Count; i++)
            {

                //extract the TextBox values
                TextBox tbaircnty = (TextBox)Repeater2.Items[rowIndex].FindControl("aircraftcnty");
                TextBox tbTextBox2 = (TextBox)Repeater2.Items[rowIndex].FindControl("aRegNo");
                TextBox tbaMake = (TextBox)Repeater2.Items[rowIndex].FindControl("aMake");
                TextBox tbmMake = (TextBox)Repeater2.Items[rowIndex].FindControl("mMake");
                TextBox tbaModelNo = (TextBox)Repeater2.Items[rowIndex].FindControl("aModelNo");
                TextBox tbmModelNo = (TextBox)Repeater2.Items[rowIndex].FindControl("mModelNo");
                TextBox tbboatYrBuilt = (TextBox)Repeater2.Items[rowIndex].FindControl("boatYrBuilt");
                TextBox tbmotorYrBuilt = (TextBox)Repeater2.Items[rowIndex].FindControl("motorYrBuilt");
                TextBox tbblength = (TextBox)Repeater2.Items[rowIndex].FindControl("blength");
                TextBox tbhullmaterial = (TextBox)Repeater2.Items[rowIndex].FindControl("hullmaterial");
                TextBox tbmhorsepower = (TextBox)Repeater2.Items[rowIndex].FindControl("mhorsepower");
                RadioButtonList rblhoreslist = (RadioButtonList)Repeater2.Items[rowIndex].FindControl("rdlmhorsepType");
                TextBox tbdatePurchased = (TextBox)Repeater2.Items[rowIndex].FindControl("txtdatePurchased");
                TextBox tbrbmdatePurchased = (TextBox)Repeater2.Items[rowIndex].FindControl("mdatePurchased");
                RadioButtonList rbltypelist = (RadioButtonList)Repeater2.Items[rowIndex].FindControl("rblPurchaseType");
                RadioButtonList rblpurchasedlist = (RadioButtonList)Repeater2.Items[rowIndex].FindControl("rblmPurchasedType");
                TextBox tbPrevOnwerName = (TextBox)Repeater2.Items[rowIndex].FindControl("txtPrevOnwerName");
                TextBox tbprevAddr = (TextBox)Repeater2.Items[rowIndex].FindControl("txtprevAddr");
                TextBox tbprevCity = (TextBox)Repeater2.Items[rowIndex].FindControl("txtprevCity");
                DropDownList tbPrevState = (DropDownList)Repeater2.Items[rowIndex].FindControl("ddlPrevState");
                TextBox tbprevzip = (TextBox)Repeater2.Items[rowIndex].FindControl("txtprevzip");
                TextBox tbmPrevOnwerName = (TextBox)Repeater2.Items[rowIndex].FindControl("txtmPrevOnwerName");
                TextBox tbmprevAddr = (TextBox)Repeater2.Items[rowIndex].FindControl("txtmprevAddr");
                TextBox tbmprevCity = (TextBox)Repeater2.Items[rowIndex].FindControl("txtmprevCity");
                DropDownList tbmPrevState = (DropDownList)Repeater2.Items[rowIndex].FindControl("ddlmPrevState");
                TextBox tbmprevzip = (TextBox)Repeater2.Items[rowIndex].FindControl("txtmprevzip");
                TextBox tbbuyername = (TextBox)Repeater2.Items[rowIndex].FindControl("txtbuyername");
                TextBox tbbuyeraddress = (TextBox)Repeater2.Items[rowIndex].FindControl("txtbuyeraddress");
                TextBox tbbuyercity = (TextBox)Repeater2.Items[rowIndex].FindControl("txtbuyercity");
                DropDownList tbbuyerstate = (DropDownList)Repeater2.Items[rowIndex].FindControl("lblbuyerstate");
                TextBox tbbuyerzip = (TextBox)Repeater2.Items[rowIndex].FindControl("txtbuyerzip");
                TextBox txtdatesold = (TextBox)Repeater2.Items[rowIndex].FindControl("txtdatesold");
                TextBox tbsalePrice = (TextBox)Repeater2.Items[rowIndex].FindControl("txtsalePrice");
                TextBox tbDescription = (TextBox)Repeater2.Items[rowIndex].FindControl("txtDescription");
                TextBox tbmbuyername = (TextBox)Repeater2.Items[rowIndex].FindControl("txtmbuyername");
                TextBox tbmbuyeraddress = (TextBox)Repeater2.Items[rowIndex].FindControl("txtmbuyeraddress");
                TextBox tbmbuyercity = (TextBox)Repeater2.Items[rowIndex].FindControl("txtmbuyercity");
                DropDownList tbmbuyerstate = (DropDownList)Repeater2.Items[rowIndex].FindControl("lblmbuyerstate");
                TextBox tbmbuyerzip = (TextBox)Repeater2.Items[rowIndex].FindControl("txtmbuyerzip");
                TextBox tbmdatesold = (TextBox)Repeater2.Items[rowIndex].FindControl("txtmdatesold");
                TextBox tbmsalePrice = (TextBox)Repeater2.Items[rowIndex].FindControl("txtmsalePrice");
                TextBox tbmDescription = (TextBox)Repeater2.Items[rowIndex].FindControl("txtmDescription");
                TextBox tbboatCost = (TextBox)Repeater2.Items[rowIndex].FindControl("boatCost");
                TextBox tbmotorCost = (TextBox)Repeater2.Items[rowIndex].FindControl("motorCost");
                RadioButtonList rbllist1 = (RadioButtonList)Repeater2.Items[rowIndex].FindControl("rblIssues");
                TextBox tbfunctionalIsses = (TextBox)Repeater2.Items[rowIndex].FindControl("functionalIsses");
                RadioButtonList rbllist2 = (RadioButtonList)Repeater2.Items[rowIndex].FindControl("mrblIssues");
                TextBox tbmfunctionalIsses = (TextBox)Repeater2.Items[rowIndex].FindControl("mfunctionalIsses");
                TextBox tbvesseltypeUse = (TextBox)Repeater2.Items[rowIndex].FindControl("txtvesseltypeUse");
                TextBox tbvesselname = (TextBox)Repeater2.Items[rowIndex].FindControl("txtvesselname");
                TextBox tbvessellength = (TextBox)Repeater2.Items[rowIndex].FindControl("txtvessellength");
                TextBox tbvesselYrBult = (TextBox)Repeater2.Items[rowIndex].FindControl("txtvesselYrBult");
                TextBox tbVesselHullMateria = (TextBox)Repeater2.Items[rowIndex].FindControl("txtVesselHullMateria");
                TextBox tbvesselhorsepEngine = (TextBox)Repeater2.Items[rowIndex].FindControl("vesselhorsepEngine");
                TextBox tbcoastGuardNumber = (TextBox)Repeater2.Items[rowIndex].FindControl("coastGuardNumber");
                TextBox txtVesselYrPurchased = (TextBox)Repeater2.Items[rowIndex].FindControl("txtVesselYrPurchased");
                RadioButtonList PurchasedNew = (RadioButtonList)Repeater2.Items[rowIndex].FindControl("rblVPurchasedNew");
                TextBox tbVesselPurchaseAmt = (TextBox)Repeater2.Items[rowIndex].FindControl("VesselPurchaseAmt");
                TextBox tbtxthomePort = (TextBox)Repeater2.Items[rowIndex].FindControl("txthomePort");
                TextBox tbtxtwhereDocked = (TextBox)Repeater2.Items[rowIndex].FindControl("txtwhereDocked");
                TextBox tbbmequipAccessoryList = (TextBox)Repeater2.Items[rowIndex].FindControl("bmequipAccessoryList");


                tbaircnty.Text = dt.Rows[i]["boatcnty"].ToString();
                tbTextBox2.Text = dt.Rows[i]["aRegNo"].ToString();
                tbaMake.Text = dt.Rows[i]["aMake"].ToString();
                tbmMake.Text = dt.Rows[i]["mMake"].ToString();
                tbaModelNo.Text = dt.Rows[i]["ModelNoA"].ToString();
                tbmModelNo.Text = dt.Rows[i]["ModelNoM"].ToString();
                tbboatYrBuilt.Text = dt.Rows[i]["boatYrBuilt"].ToString();
                tbmotorYrBuilt.Text = dt.Rows[i]["motorYrBuilt"].ToString();
                tbblength.Text = dt.Rows[i]["blength"].ToString();
                tbhullmaterial.Text = dt.Rows[i]["hullmaterial"].ToString();
                tbmhorsepower.Text = dt.Rows[i]["mhorsepower"].ToString();

                //account for null values to prevent errors.
                if (!string.IsNullOrEmpty(dt.Rows[i]["rdlmhorsepType"].ToString()))
                {
                    rblhoreslist.Items.FindByText(dt.Rows[i]["rdlmhorsepType"].ToString()).Selected = true;
                }
                tbdatePurchased.Text = dt.Rows[i]["datePurchased"].ToString();
                tbrbmdatePurchased.Text = dt.Rows[i]["mdatePurchased"].ToString();

                if (!string.IsNullOrEmpty(dt.Rows[i]["PurchaseType"].ToString()))
                {
                    rbltypelist.Items.FindByText(dt.Rows[i]["PurchaseType"].ToString()).Selected = true;
                }

                if (!string.IsNullOrEmpty(dt.Rows[i]["rblmPurchasedType"].ToString()))
                {
                    rblpurchasedlist.Items.FindByText(dt.Rows[i]["rblmPurchasedType"].ToString()).Selected = true;
                }

                tbPrevOnwerName.Text = dt.Rows[i]["PrevOnwerName"].ToString();
                tbprevAddr.Text = dt.Rows[i]["prevAddr"].ToString();
                tbprevCity.Text = dt.Rows[i]["prevCity"].ToString();
                tbPrevState.Text = dt.Rows[i]["PrevState"].ToString();
                tbprevzip.Text = dt.Rows[i]["prevzip"].ToString();
                tbmPrevOnwerName.Text = dt.Rows[i]["mPrevOnwerName"].ToString();
                tbmprevAddr.Text = dt.Rows[i]["mprevAddr"].ToString();
                tbmprevCity.Text = dt.Rows[i]["mprevCity"].ToString();
                tbmprevzip.Text = dt.Rows[i]["mprevzip"].ToString();
                tbbuyername.Text = dt.Rows[i]["buyername"].ToString();
                tbbuyeraddress.Text = dt.Rows[i]["buyeraddress"].ToString();
                tbbuyercity.Text = dt.Rows[i]["buyercity"].ToString();
                tbbuyerstate.Text = dt.Rows[i]["buyerstate"].ToString();
                tbbuyerzip.Text = dt.Rows[i]["buyerzip"].ToString();
                txtdatesold.Text = dt.Rows[i]["datesold"].ToString();
                tbsalePrice.Text = dt.Rows[i]["salePrice"].ToString();
                tbDescription.Text = dt.Rows[i]["Description"].ToString();
                tbmbuyername.Text = dt.Rows[i]["mbuyername"].ToString();
                tbmbuyeraddress.Text = dt.Rows[i]["mbuyeraddress"].ToString();
                tbmbuyerstate.Text = dt.Rows[i]["mbuyerstate"].ToString();
                tbmbuyerzip.Text = dt.Rows[i]["mbuyerzip"].ToString();
                tbmdatesold.Text = dt.Rows[i]["mdatesold"].ToString();
                tbmsalePrice.Text = dt.Rows[i]["msalePrice"].ToString();
                tbmDescription.Text = dt.Rows[i]["mDescription"].ToString();
                tbboatCost.Text = dt.Rows[i]["boatCost"].ToString();
                tbmotorCost.Text = dt.Rows[i]["motorCost"].ToString();

                if (!string.IsNullOrEmpty(dt.Rows[i]["rblIssues"].ToString()))
                {
                    rbllist1.Items.FindByText(dt.Rows[i]["rblIssues"].ToString()).Selected = true;
                }

                tbfunctionalIsses.Text = dt.Rows[i]["functionalIsses"].ToString();

                if (!string.IsNullOrEmpty(dt.Rows[i]["mrblIssues"].ToString()))
                {
                    rbllist2.Items.FindByText(dt.Rows[i]["mrblIssues"].ToString()).Selected = true;
                }

                tbmfunctionalIsses.Text = dt.Rows[i]["mfunctionalIsses"].ToString();
                tbvesseltypeUse.Text = dt.Rows[i]["vesseltypeUse"].ToString();
                tbvesselname.Text = dt.Rows[i]["vesselname"].ToString();
                tbvessellength.Text = dt.Rows[i]["vessellength"].ToString();
                tbvesselYrBult.Text = dt.Rows[i]["vesselYrBult"].ToString();
                tbVesselHullMateria.Text = dt.Rows[i]["VesselHullMateria"].ToString();
                tbvesselhorsepEngine.Text = dt.Rows[i]["vesselhorsepEngine"].ToString();
                tbcoastGuardNumber.Text = dt.Rows[i]["coastGuardNumber"].ToString();
                txtVesselYrPurchased.Text = dt.Rows[i]["VesselYrPurchased"].ToString();

                if (!string.IsNullOrEmpty(dt.Rows[i]["PurchasedNew"].ToString()))
                {
                    PurchasedNew.Items.FindByText(dt.Rows[i]["PurchasedNew"].ToString()).Selected = true;
                }

                tbVesselPurchaseAmt.Text = dt.Rows[i]["VesselPurchaseAmt"].ToString();
                tbtxthomePort.Text = dt.Rows[i]["homePort"].ToString();
                tbtxtwhereDocked.Text = dt.Rows[i]["whereDocked"].ToString();
                tbbmequipAccessoryList.Text = dt.Rows[i]["bmequipAccessoryList"].ToString();

                if (dt.Rows.Count - 1 == i)
                {
                    tbTextBox2.Text = registerNumber;
                    tbcoastGuardNumber.Text = bregisterNumber;
                }

                rowIndex++;
            }
        }
    }
}


Thank you very much.

God was on my side yesterday as management cancelled the scheduled demo due to other commitments.
GeneralRe: Repeater2 is not getting populated with data from Repeater2. Any ideas? Pin
Richard Deeming22-Sep-17 3:35
mveRichard Deeming22-Sep-17 3:35 
GeneralRe: Repeater2 is not getting populated with data from Repeater2. Any ideas? Pin
samflex22-Sep-17 3:49
samflex22-Sep-17 3:49 
GeneralRe: Repeater2 is not getting populated with data from Repeater2. Any ideas? Pin
Richard Deeming22-Sep-17 4:39
mveRichard Deeming22-Sep-17 4:39 
GeneralRe: Repeater2 is not getting populated with data from Repeater2. Any ideas? Pin
samflex22-Sep-17 4:56
samflex22-Sep-17 4:56 
GeneralRe: Repeater2 is not getting populated with data from Repeater2. Any ideas? Pin
samflex22-Sep-17 5:09
samflex22-Sep-17 5:09 
GeneralRe: Repeater2 is not getting populated with data from Repeater2. Any ideas? Pin
samflex22-Sep-17 5:35
samflex22-Sep-17 5:35 
GeneralRe: Repeater2 is not getting populated with data from Repeater2. Any ideas? Pin
Richard Deeming22-Sep-17 5:43
mveRichard Deeming22-Sep-17 5:43 
GeneralRe: Repeater2 is not getting populated with data from Repeater2. Any ideas? Pin
samflex22-Sep-17 8:19
samflex22-Sep-17 8:19 
GeneralRe: Repeater2 is not getting populated with data from Repeater2. Any ideas? Pin
samflex22-Sep-17 9:11
samflex22-Sep-17 9:11 
GeneralRe: Repeater2 is not getting populated with data from Repeater2. Any ideas? Pin
Richard Deeming25-Sep-17 1:53
mveRichard Deeming25-Sep-17 1:53 
GeneralRe: Repeater2 is not getting populated with data from Repeater2. Any ideas? Pin
samflex25-Sep-17 3:22
samflex25-Sep-17 3:22 
GeneralRe: Repeater2 is not getting populated with data from Repeater2. Any ideas? Pin
Richard Deeming25-Sep-17 3:51
mveRichard Deeming25-Sep-17 3:51 
GeneralRe: Repeater2 is not getting populated with data from Repeater2. Any ideas? Pin
samflex25-Sep-17 4:20
samflex25-Sep-17 4:20 
GeneralRe: Repeater2 is not getting populated with data from Repeater2. Any ideas? Pin
Richard Deeming25-Sep-17 4:30
mveRichard Deeming25-Sep-17 4:30 
GeneralRe: Repeater2 is not getting populated with data from Repeater2. Any ideas? Pin
samflex25-Sep-17 6:32
samflex25-Sep-17 6:32 
GeneralRe: Repeater2 is not getting populated with data from Repeater2. Any ideas? Pin
Richard Deeming25-Sep-17 6:36
mveRichard Deeming25-Sep-17 6:36 
GeneralRe: Repeater2 is not getting populated with data from Repeater2. Any ideas? Pin
samflex25-Sep-17 8:23
samflex25-Sep-17 8:23 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.