monisha sampath

monisha sampath

  • NA
  • 15
  • 853

How to add row to TBL on ajax success with one column as dropdown

Sep 24 2021 6:14 PM
@model Sampleapplication.Models.samplemodel

Id

Name

Department

I need help in adding row dynamically on ajax success

Row should contain only one column as dropdown other columns as td

 

success: function (data) {$.each(data, function (i, item) {var rows = ""+ "" + item.Id + ""+ "" + item.Name + ""+ "@Html.ListBoxFor(m => m.sDepartmentList, Model.lstToDepartment, new { Name = "Departmentlst", id = "Departmentlst", @placeholder = "Select Deaprtment" })"+ "";$('#tabledetails tbody').append(rows);
};

 

 


Answers (2)