Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

155
Views
How to append row(with mutiple input column and one dropdownlistcolumn) to table on ajax sucess

I need to add drop down or list box in place of comment from model added at view. kindly suggest any other alternative method since i am new to this

Html code:

@model Sampleapplication.Models.samplemodel
<body>
            <table id="tabledetails" class="table table-bordered loaded-table">
                <thead>
                    <tr>
                  
                        <th>  <p>Id</p></th>
                        <th>  <p>Name</p></th>
                        <th>  <p>Department</p></th>
                     
                    </tr>
                </thead>
                <tbody></tbody>
            </table>
  </body>

on ajax success:

 success: function (data) {
                   
                         $.each(data, function (i, item) {

                             var rows = "<tr>"


                                 + "<td class='prtoducttd1'>" + item.Id + "</td>"
                                 + "<td class='prtoducttd2'>" + item.Name + "</td>"
                               
                                 + "<td class='prtoducttd11'>@Html.ListBoxFor(m => m.sDepartmentList, Model.lstToDepartment, new { Name = "Departmentlst", id = "Departmentlst", @placeholder = "Select Deaprtment" })</td>"
                                 + "</tr>";
                             $('#tabledetails tbody').append(rows);
about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!