jQWidgets Forums
jQuery UI Widgets › Forums › Grid › Import CSV file into GRID issue › Reply To: Import CSV file into GRID issue
Uploading the code snippet after debugging, with watch results for the variable, I hope this can help you to suggest me in better manner:
/* Import */
$(“#upload”).change(function () {
debugger;
var url = $(“#upload”).val(); url = “C:\fakepath\Vehicle Register.csv”
var source = { source = Object {datatype: “csv”, datafields: Array[12], url: “url”}
datatype: “csv”,
datafields: [
{name: ‘vehicleId’, type: ‘string’},
{name: ‘rego’, type: ‘string’},
{name: ‘dtPurchased’, type: ‘string’},
{name: ‘vin’, type: ‘string’},
{name: ‘manufacturer’, type: ‘string’},
{name: ‘model’, type: ‘string’},
{name: ‘color’, type: ‘string’},
{name: ‘yearmonth’, type: ‘string’},
{name: ‘amount’, type: ‘string’},
{name: ‘dtSold’, type: ‘string’},
{name: ‘state’, type: ‘string’},
{name: ‘Edit’, type: ‘button’}
],
url: ‘url’ url = “C:\fakepath\Vehicle Register.csv”
};
var dataAdapter = new $.jqx.dataAdapter(source); dataAdapter = i.jqx.dataAdapter {_source: Object, _options: Object, records: Array[0], _downloadComplete: Array[0], _bindingUpdate: Array[0]}, source
// initialize jqxGrid
$(“#jqxgrid”).jqxGrid(
{