jeditable table cell

Posted by user666262 on Stack Overflow See other posts from Stack Overflow or by user666262
Published on 2011-03-18T15:24:26Z Indexed on 2011/03/18 16:10 UTC
Read the original article Hit count: 247

Filed under:
|

Hi all,

I am having an issue when using jeditable to edit a cell in a table.

The project is the MVC 2 web application and the table has been put on the standard about page. How do i tell the script to call a specific method in the controller ? because it is currently just loading the entire page into the cell.

This is the javascript:

$(document).ready(function () { $('.editable').editable('http://localhost:2196/Home/About', { type: 'text', cancel: 'Cancel', event: 'dblclick', submit: 'OK', tooltip: 'double Click to edit...' }); });

This is the table :

        <% foreach (DataTableEditable.Models.Company item in (IEnumerable<DataTableEditable.Models.Company>)Model)
        {%>
            <tr id="<%= Html.Encode(item.ID) %>">
                <td  class="editable"><%= Html.Encode(item.Name) %> </td>
                <td><%= Html.Encode(item.Address) %> </td>
                <td><%= Html.Encode(item.Town) %> </td>
            </tr>
         <%  }%>

Thanks lots John

© Stack Overflow or respective owner

Related posts about asp.net-mvc

Related posts about jeditable