Click here to Skip to main content
15,919,613 members
Please Sign up or sign in to vote.
2.00/5 (1 vote)
See more:
in this i had bind data in code behind.i need that Eid as editable and Remarks as dropdown pls give solution...
XML
<script type="text/javascript">
    $(document).ready(function() {
        $.ajax({
            type: "POST",
            contentType: "application/json; charset=utf-8",
            url: "Default2.aspx/BindDatatable",
            data: "{}",
            dataType: "json",
            success: function(data) {
                for (var i = 0; i < data.d.length; i++) {
                    $("#tbDetails").append(
                       "<tr><td style='editable'>" +  data.d[i].Eid +
                       "</td><td>" + data.d[i].Ename +
                       "</td><td>" + data.d[i].Edesgn +
                       "</td><td>" + data.d[i].Esalary +
                       "</td><td>" + data.d[i].Remarks +
                       "</td></tr>");
                }
            },
            error: function(result) {
                alert("Error");
            }
                   });
    });
</script>
Posted
Comments
ZurdoDev 16-Aug-12 8:05am    
I have no idea what "Eid as editable and Remarks as dropdown" means.

1 solution

If I have got you correctly, you want to edit the columns in each row and will have a dropdown in Remarks column.

This is a bit different story what you have posted of JSON call to get data from Default2.aspx.

In "success", when you get the data, you need to fill up the data in some editable grid instead display in table tag what you did.

Check the urls, which you will find interesting,
Editable GridView in ASP.NET 2.0[^]
http://aspnet-with-c-sharp.blogspot.in/2011/02/fully-editable-gridview-in-aspnet-2.html[^]

Hope this helps.
cheers
 
Share this answer
 
v2

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