Tuesday, 26 July 2016

DataTable Issue: Cannot set property '_DT_Cellindex' of undefined



First of all check the table structure:

Number of columns in ( th ) in thead section must equal number of columns (td) in tbody section.

Happy Coding!

Wednesday, 13 April 2016

Send List of string using ajax on mvc controller

  var stringArray = new Array();
// or var stringArray=[];
 stringArray.push('1');
 stringArray.push('2');

var data = JSON.stringify({
                'AllRecord': stringArray
            });

 $.ajax({
                url: 'url',
                cache: false,
                traditional: true,
                type: 'POST',
                contentType: 'application/json; charset=utf-8',
                data: data,
                dataType: "json",
                success: function (data) {
                    // Code to be on success of this call
                }
            })

//In controller grab it like below

  public ActionResult SaveCompanyAndSendMailToAllUsers(List<String> AllAgents)
        {
               // your logic
        }