Click here to Skip to main content
15,924,581 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi All,

I am using knockout.js for listing and editing data. Currently i am facing one issue is that , when i clik on one item in a list ,i cant view it for edit in view page. i am getting selected item :

HTML
<tr data-bind="click: $root.AddJob">


in my javascript file i add one function

C#
self.AddJob = function (Job) {
       self.JobTitle = Job.JobTitle;
       self.JobID = Job.JobID;
       self.JobDesc = Job.JobDesc;
   };



now i have a ViewTicket partail view for view the selected item for edit. i am calling partial view like:

HTML
<div id="ViewTicketpopup" style="display:none">
   @Html.Partial("_ViewTicket")
</div>



XML
<script type="text/javascript">
        $(document).ready(function () {
            $('#listingtr').click(function (event) {
                $("#ViewTicketpopup").dialog("open");
                $('#ViewTicketpopup').dialog({
                    height: 430,
                    width: 700,
                    modal: true,
                    title: 'View Ticket'
                });
                return false;
            });
        });
    </script>



when i click one item the popup will show ,but i dont know how to send the selected item for display.In partial view i binded all the elements for display.so now i am stuck in displaying selected item.plz help me
Posted
Updated 7-Aug-13 2:03am
v2

1 solution

 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900