I want to bind DataTable get from Excel Sheet to a Jquery Datatable. And my aim is to bind all the columns for the Datatable as dynamically. I have no idea how to bind the columns dynamically.
C# and Jquery is the code base
In this code, I get the data from the excel sheet as a Datatable
region DataValidation
public DataTable DataValidation(string dataExchangeSelectedColum, string entityvalue,string filename)
{
UA patsUA = Session["PaTSUA"] as UA;
//List<DataExchangeDefinitionViewModel> dataExchangeDefinitionListVM = _mapper.MapToDataExchangeDefinitionViewModelList(_dataExchangeBusiness.ValidateDataType(dataExchangeSelectedColum, entityvalue, filename, patsUA.DBConnectionString));
DataTable dataTable = _dataExchangeBusiness.DataValidation(dataExchangeSelectedColum, entityvalue, filename, patsUA.DBConnectionString);
return dataTable;
}
#endregion DataValidation
I want to bind the above DataTable into jquery Datatable. The above Datatable may vary that is the columns vary in different situations. so columns must bind dynamically.