All properties of an object doesn't get binded when using with data-binding

29 views
Skip to first unread message

my

unread,
Feb 23, 2018, 11:06:55 PM2/23/18
to KnockoutJS
I have a partial view to show modal pop-up  inside a partial view like below

    <div data-bind="visible: clientObservables.showPopup">


        @Html.Partial("~/Views/RecurringPayments/Dialogs/_ViewClientDetailsPopup.cshtml")

        @Html.Partial("~/Views/RecurringPayments/Dialogs/_EditClientDetailsPopup.cshtml")

    </div>

And inside the partial view  for the pop -up, i am using with binding

<div class="popup" data-popup="viewDetailsPopup">
    <div class="popup-inner" data-bind="with: clientObservables.mcpResults">
        <div class="popup-header">Client Profile Details</div>
        <p class="paSummaryHeader">FirstName:</p>
        <span class="summaryDetail" data-bind="text: FirstNames" />
        <p class="paSummaryHeader">Surname:</p>
        <span class="summaryDetail" data-bind="text: Surname"/>
        <p class="paSummaryHeader">ID Number/Passport Number:</p>
        <span data-bind="text: ForeignIdentityNumber" class="summaryDetail" />
        <p class="paSummaryHeader">Email Address:</p>
        <span data-bind="text: EmailAddress" class="summaryDetail" />
        <p class="paSummaryHeader">Contact Number:</p>
        <span data-bind="text: ContactNumber" class="summaryDetail" />
        <p class="paSummaryHeader">Client Reference:</p>
        @*<span data-bind="text: MerchantClientReference" class="summaryDetail" />*@
        <br />
        <br />

        <button type="button" class="btn btn-search" data-bind="click: $root.clientObservables.onMCPDetailsNoChange">Continue</button>
        <button type="button" class="btn btn-search" data-bind="click: $root.clientObservables.onClientDetailsEdit">Edit Details</button>

        <span class="popup-close"><a href="#" data-popup-close="viewDetailsPopup" data-bind="click: $root.clientObservables.onClosePopup">x</a></span>

    </div>
</div>

I am not sure what the problem is, only the first property of my object mcpResults shows in the pop-up and then rest of html in the popup doesn't get rendered. Not sure what the problem is. Please find attached file for my pop-up.
POPUP.PNG
Reply all
Reply to author
Forward
0 new messages