Click here to Skip to main content
14,841,092 members
Home / Discussions / ASP.NET
   

ASP.NET

 
AnswerRe: Repeater2 is not getting populated with data from Repeater2. Any ideas? Pin
Richard Deeming20-Sep-17 10:15
mveRichard Deeming20-Sep-17 10:15 
GeneralRe: Repeater2 is not getting populated with data from Repeater2. Any ideas? Pin
samflex21-Sep-17 3:50
Membersamflex21-Sep-17 3:50 
GeneralRe: Repeater2 is not getting populated with data from Repeater2. Any ideas? Pin
Richard Deeming21-Sep-17 5:12
mveRichard Deeming21-Sep-17 5:12 
GeneralRe: Repeater2 is not getting populated with data from Repeater2. Any ideas? Pin
samflex21-Sep-17 6:33
Membersamflex21-Sep-17 6:33 
GeneralRe: Repeater2 is not getting populated with data from Repeater2. Any ideas? Pin
Richard Deeming21-Sep-17 6:39
mveRichard Deeming21-Sep-17 6:39 
GeneralRe: Repeater2 is not getting populated with data from Repeater2. Any ideas? Pin
samflex21-Sep-17 7:26
Membersamflex21-Sep-17 7:26 
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
Membersamflex21-Sep-17 8:32 
That's true sir but the error came up because I added the rest of the code for SetInitialRow2() unless you asking me to use only the ones you posted.

If so, how do I handle the rest because they are supposed to populate Repeater2 when user enters an account number just like MarineRegNo and the other 3 that came with SetInitialRow()

Here is the complete code for SetInitialRow2(). I posted entire code yesterday.
Thanks so much for all your help.

private void SetInitialRow2(string registerNumber, string bregisterNumber)
{
    DataTable dta;
    if (ViewState["CurrentTable"] == null)
    {
        dta = new DataTable();
        DataRow dr = null;
    //Create DataTable columns
    dta.Columns.Add(new DataColumn("RowNumber", typeof(string)));
    dta.Columns.Add(new DataColumn("boatcnty", typeof(string)));
    dta.Columns.Add(new DataColumn("aRegNo", typeof(string)));
    dta.Columns.Add(new DataColumn("aMake", typeof(string)));
    dta.Columns.Add(new DataColumn("mMake", typeof(string)));
    dta.Columns.Add(new DataColumn("ModelNoA", typeof(string)));
    dta.Columns.Add(new DataColumn("ModelNoM", typeof(string)));
    dta.Columns.Add(new DataColumn("boatYrBuilt", typeof(string)));
    dta.Columns.Add(new DataColumn("motorYrBuilt", typeof(string)));
    dta.Columns.Add(new DataColumn("blength", typeof(string)));
    dta.Columns.Add(new DataColumn("hullmaterial", typeof(string)));
    dta.Columns.Add(new DataColumn("mhorsepower", typeof(string)));
    dta.Columns.Add(new DataColumn("rdlmhorsepType", typeof(string)));
    dta.Columns.Add(new DataColumn("datePurchased", typeof(string)));
    dta.Columns.Add(new DataColumn("mdatePurchased", typeof(string)));
    dta.Columns.Add(new DataColumn("PurchaseType", typeof(string)));
    dta.Columns.Add(new DataColumn("rblmPurchasedType", typeof(string)));
    dta.Columns.Add(new DataColumn("PrevOnwerName", typeof(string)));
    dta.Columns.Add(new DataColumn("prevAddr", typeof(string)));
    dta.Columns.Add(new DataColumn("prevCity", typeof(string)));
    dta.Columns.Add(new DataColumn("PrevState", typeof(string)));
    dta.Columns.Add(new DataColumn("prevzip", typeof(string)));
    dta.Columns.Add(new DataColumn("mPrevOnwerName", typeof(string)));
    dta.Columns.Add(new DataColumn("mprevAddr", typeof(string)));
    dta.Columns.Add(new DataColumn("mprevCity", typeof(string)));
    dta.Columns.Add(new DataColumn("mPrevState", typeof(string)));
    dta.Columns.Add(new DataColumn("mprevzip", typeof(string)));
    dta.Columns.Add(new DataColumn("buyername", typeof(string)));
    dta.Columns.Add(new DataColumn("buyeraddress", typeof(string)));
    dta.Columns.Add(new DataColumn("buyercity", typeof(string)));
    dta.Columns.Add(new DataColumn("buyerstate", typeof(string)));
    dta.Columns.Add(new DataColumn("buyerzip", typeof(string)));
    dta.Columns.Add(new DataColumn("datesold", typeof(string)));
    dta.Columns.Add(new DataColumn("salePrice", typeof(string)));
    dta.Columns.Add(new DataColumn("Description", typeof(string)));
    dta.Columns.Add(new DataColumn("mbuyername", typeof(string)));
    dta.Columns.Add(new DataColumn("mbuyeraddress", typeof(string)));
    dta.Columns.Add(new DataColumn("mbuyercity", typeof(string)));
    dta.Columns.Add(new DataColumn("mbuyerstate", typeof(string)));
    dta.Columns.Add(new DataColumn("mbuyerzip", typeof(string)));
    dta.Columns.Add(new DataColumn("mdatesold", typeof(string)));
    dta.Columns.Add(new DataColumn("msalePrice", typeof(string)));
    dta.Columns.Add(new DataColumn("mDescription", typeof(string)));
    dta.Columns.Add(new DataColumn("boatCost", typeof(string)));
    dta.Columns.Add(new DataColumn("motorCost", typeof(string)));
    dta.Columns.Add(new DataColumn("rblIssues", typeof(string)));
    dta.Columns.Add(new DataColumn("functionalIsses", typeof(string)));
    dta.Columns.Add(new DataColumn("mrblIssues", typeof(string)));
    dta.Columns.Add(new DataColumn("mfunctionalIsses", typeof(string)));
    dta.Columns.Add(new DataColumn("vesseltypeUse", typeof(string)));
    dta.Columns.Add(new DataColumn("vesselname", typeof(string)));
    dta.Columns.Add(new DataColumn("vessellength", typeof(string)));
    dta.Columns.Add(new DataColumn("vesselYrBult", typeof(string)));
    dta.Columns.Add(new DataColumn("VesselHullMateria", typeof(string)));
    dta.Columns.Add(new DataColumn("vesselhorsepEngine", typeof(string)));
    dta.Columns.Add(new DataColumn("coastGuardNumber", typeof(string)));
    dta.Columns.Add(new DataColumn("VesselYrPurchased", typeof(string)));
    dta.Columns.Add(new DataColumn("PurchasedNew", typeof(string)));
    dta.Columns.Add(new DataColumn("VesselPurchaseAmt", typeof(string)));
    dta.Columns.Add(new DataColumn("homePort", typeof(string)));
    dta.Columns.Add(new DataColumn("whereDocked", typeof(string)));
    dta.Columns.Add(new DataColumn("bmequipAccessoryList", typeof(string)));
    //Create Row for each columns
    dr = dta.NewRow();
    dr["RowNumber"] = 1;
    dr["boatcnty"] = string.Empty;
    dr["ARegNo"] = registerNumber;
    dr["aMake"] = string.Empty;
    dr["mMake"] = string.Empty;
    dr["ModelNoA"] = string.Empty;
    dr["ModelNoM"] = string.Empty;
    dr["boatYrBuilt"] = string.Empty;
    dr["motorYrBuilt"] = string.Empty;
    dr["blength"] = string.Empty;
    dr["hullmaterial"] = string.Empty;
    dr["mhorsepower"] = string.Empty;
    dr["rdlmhorsepType"] = string.Empty;
    dr["datePurchased"] = string.Empty;
    dr["mdatePurchased"] = string.Empty;
    dr["PurchaseType"] = string.Empty;
    dr["rblmPurchasedType"] = string.Empty;
    dr["PrevOnwerName"] = string.Empty;
    dr["prevAddr"] = string.Empty;
    dr["prevCity"] = string.Empty;
    dr["PrevState"] = string.Empty;
    dr["prevzip"] = string.Empty;
    dr["mPrevOnwerName"] = string.Empty;
    dr["mprevAddr"] = string.Empty;
    dr["mprevCity"] = string.Empty;
    dr["mPrevState"] = string.Empty;
    dr["mprevzip"] = string.Empty;
    dr["buyername"] = string.Empty;
    dr["buyeraddress"] = string.Empty;
    dr["buyercity"] = string.Empty;
    dr["buyerstate"] = string.Empty;
    dr["buyerzip"] = string.Empty;
    dr["datesold"] = string.Empty;
    dr["salePrice"] = string.Empty;
    dr["Description"] = string.Empty;
    dr["mbuyername"] = string.Empty;
    dr["mbuyeraddress"] = string.Empty;
    dr["mbuyercity"] = string.Empty;
    dr["mbuyerstate"] = string.Empty;
    dr["mbuyerzip"] = string.Empty;
    dr["mdatesold"] = string.Empty;
    dr["msalePrice"] = string.Empty;
    dr["mDescription"] = string.Empty;
    dr["boatCost"] = string.Empty;
    dr["motorCost"] = string.Empty;
    dr["rblIssues"] = string.Empty;
    dr["functionalIsses"] = string.Empty;
    dr["mrblIssues"] = string.Empty;
    dr["mfunctionalIsses"] = string.Empty;
    dr["vesseltypeUse"] = string.Empty;
    dr["vesselname"] = string.Empty;
    dr["vessellength"] = string.Empty;
    dr["vesselYrBult"] = string.Empty;
    dr["VesselHullMateria"] = string.Empty;
    dr["vesselhorsepEngine"] = string.Empty;
    dr["coastGuardNumber"] = bregisterNumber;
    dr["VesselYrPurchased"] = string.Empty;
    dr["PurchasedNew"] = string.Empty;
    dr["VesselPurchaseAmt"] = string.Empty;
    dr["homePort"] = string.Empty;
    dr["whereDocked"] = string.Empty;
    dr["bmequipAccessoryList"] = string.Empty;
    dta.Rows.Add(dr);
    }
    else
    {
        dta = (DataTable)ViewState["CurrentTable"];
    }
    ViewState["CurrentTable"] = dta;
    if (dta.Rows.Count > 0)
    {
        Repeater2.DataSource = dta;
        Repeater2.DataBind();
    }
}

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
Membersamflex21-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
Membersamflex21-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
Membersamflex22-Sep-17 3:29 
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
Membersamflex22-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
Membersamflex22-Sep-17 4:56 
GeneralRe: Repeater2 is not getting populated with data from Repeater2. Any ideas? Pin
samflex22-Sep-17 5:09
Membersamflex22-Sep-17 5:09 
GeneralRe: Repeater2 is not getting populated with data from Repeater2. Any ideas? Pin
samflex22-Sep-17 5:35
Membersamflex22-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
Membersamflex22-Sep-17 8:19 
GeneralRe: Repeater2 is not getting populated with data from Repeater2. Any ideas? Pin
samflex22-Sep-17 9:11
Membersamflex22-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
Membersamflex25-Sep-17 3:22 

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.