Hi,
i've lots of records returned from server, and some data is replicate for each row.
So, I'd like to create a dictionary server side, pass with the table "data" JSON, and bind each ID (for some field) with this dictionary.
What's the best way to do it? createdRow?
Not sure which is the value to pass to it:
dtGrid = $("#grid").DataTable({
ajax: {
url: "@(Url.Action("GetWorktypes", "Worktypes"))"
},
columns: [
{ data: "ID", title: "", visible: false, searchable: false },
{ data: "ClinicID", title: "", visible: false, searchable: false },
{ data: "MedicalID", title: "", visible: false, searchable: false },
{ data: "PatientID", title: "", visible: false, searchable: false }
],
createdRow: function (row, data, dataIndex) {
// here?
}
});
data
contains the row, and I'll return a proper patientsDictionary
dictionary so I can bind PatientID with Name/Surname with dictionary...
This way doesn't works:
createdRow: function (row, data, dataIndex, patientsDictionary) {
// dunno is correct
}
Any clues? Thanks