Click here to Skip to main content
11,583,865 members (44,132 online)
Rate this: bad
Please Sign up or sign in to vote.
I have one html table like below, so i need to edit cell values inline using javascript.
<table id="myTable" width="50%">
        <% Html.BeginForm("Add","Holidays", FormMethod.Post); %>
            <td><input id="Date" type="text" name="date" style="width:250px"/></td>
            <td><input id="Description" type="text" name="Description" style="width:250px"/></td>
            <td><input type="submit" name="submitButton" value="Add" class="highlight"/></td>
        <% Html.EndForm(); %>
    <%foreach (Holiday kvp in (IList<Holiday>)ViewData["Holidays"])
        <td><%= kvp.Date.ToString("dd/MM/yyyy") %></td>
        <td><%= kvp.Description %></td>
        <td><%: Html.ActionLink("Edit", "Edit", "Holidays", new { year = kvp.ID.ToString("yyyy"), holidayid = kvp.ID, name = kvp.Description, date = kvp.Date },  new { @style = "color:Blue;font-size: 11px;text-decoration:none;" })%></td>
    <%} %>


Please can help me.

I mean just edit option on client side like below

Date Description
01/01/2013 Test1

now if i want change date as 02/02/2013 inline using javascript when i click on that date just change at client side like description.

Posted 28-Mar-13 1:10am
Edited 28-Mar-13 3:11am
Hariharan Arunachalam at 28-Mar-13 7:54am
By edit, do you mean to also have the data updated on the server side? or just have an edit option available on the client screen?
Hariharan Arunachalam at 28-Mar-13 9:13am
Are you willing to use/using jQuery in your pages?

1 solution

Rate this: bad
Please Sign up or sign in to vote.

Solution 2

You should peruse this - JEditable[^]. This fits your requirement in my opinion.

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

  Print Answers RSS
0 OriginalGriff 430
1 Sergey Alexandrovich Kryukov 314
2 virusstorm 223
3 Richard Deeming 220
4 Dave Kreskowiak 200
0 OriginalGriff 1,623
1 Sergey Alexandrovich Kryukov 1,135
2 Abhinav S 701
3 Dave Kreskowiak 627
4 Suvendu Shekhar Giri 568

Advertise | Privacy | Mobile
Web03 | 2.8.150603.1 | Last Updated 28 Mar 2013
Copyright © CodeProject, 1999-2015
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100