Click here to Skip to main content
14,825,934 members
Home / Discussions / ASP.NET
   

ASP.NET

 
GeneralRe: Repeater Template Desinging Pin
Member 1337195126-Sep-17 9:44
MemberMember 1337195126-Sep-17 9:44 
AnswerRe: Repeater Template Desinging Pin
Rollin Shultz28-Sep-17 2:08
MemberRollin Shultz28-Sep-17 2:08 
QuestionHow can I properly use the Trace.Write() method inside of my for loop to print month and future values? Pin
Dorakta21-Sep-17 12:36
MemberDorakta21-Sep-17 12:36 
AnswerRe: How can I properly use the Trace.Write() method inside of my for loop to print month and future values? Pin
Richard Deeming22-Sep-17 2:11
mveRichard Deeming22-Sep-17 2:11 
QuestionSystem.ServiceModel.FaultException`1 occurred Pin
jkirkerx21-Sep-17 12:05
professionaljkirkerx21-Sep-17 12:05 
AnswerRe: System.ServiceModel.FaultException`1 occurred Pin
jkirkerx22-Sep-17 6:29
professionaljkirkerx22-Sep-17 6:29 
AnswerUPS Rate SOAP WSDL Errors in VS2017 Service Reference, An exception has been raised as a result of client data. Pin
jkirkerx22-Sep-17 11:07
professionaljkirkerx22-Sep-17 11:07 
QuestionRepeater2 is not getting populated with data from Repeater2. Any ideas? Pin
samflex20-Sep-17 4:38
Membersamflex20-Sep-17 4:38 
Hi Richard, sorry to call you out but can you please help me on this issue?

I have been stomped by this now for almost 2 days.

I dynamically creating rows for both Repeater1 and Repeater2.

There is a form field called MarineRegNo on Repeater1.

Once a user enters value for this field and clicks the Next button, that value is transferred a form field called aRegNo in Repeater2.

The issue we are having is that if it is just one row, this value is not getting populated in Repeater2.

If there are two rows for instance, the first row in Repeater2 is not getting populated with value for aRegNo. However, the second row is getting populated with values for aRegNo for Repeater2.

I believe the issue lines with SetInitialRow and SetInitialRow2 functions as I think the values are getting overwritten.

Do you have any ideas how I can resolve this?

There is a ton more codes but I think the two functions below are the relevant codes that are causing the problems.

Thanks as usual for your assistance.

<pre>    private void SetInitialRow()
    {
        myMultiView.ActiveViewIndex = 0;
        DataTable dt;
        if (ViewState["CurrTable"] == null)
        {
            dt = new DataTable();
            DataRow dr = null;
            dt.Columns.Add(new DataColumn("ID", typeof(string)));
            dt.Columns.Add(new DataColumn("MarineRegNo", typeof(string)));
            dt.Columns.Add(new DataColumn("TaxPyrRetdVal", typeof(string)));
            dt.Columns.Add(new DataColumn("VesselRegNo", typeof(string)));
            dt.Columns.Add(new DataColumn("VesselTaxPyrRetdVal", typeof(string)));

            dr = dt.NewRow();
            dr["ID"] = 1;
            dr["MarineRegNo"] = string.Empty;
            dr["TaxPyrRetdVal"] = string.Empty;
            dr["VesselRegNo"] = string.Empty;
            dr["VesselTaxPyrRetdVal"] = string.Empty;
            dt.Rows.Add(dr);
        }
        else
        {
            dt = (DataTable)ViewState["CurrTable"];
        }
        ViewState["CurrTable"] = dt;
        if (dt.Rows.Count > 0)
        {
            Repeater1.DataSource = dt;
            Repeater1.DataBind();
        }
    }

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

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 
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 

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.