Hi,
I need to hide a column if there is no data returned in the first record of that column. Below is a code snippet of my datasource using showIf with a function call that needs to look at the returned dataset to determine if the column should be shown.
My problem is that I don't know if this is the correct approach to accomplish this, and if so, don't know how to access the data on this column to test if it has a value?
Can you point to an example or give me a short code snippet to get me going?
The datasource is feeding a listGrid.
I need to hide a column if there is no data returned in the first record of that column. Below is a code snippet of my datasource using showIf with a function call that needs to look at the returned dataset to determine if the column should be shown.
My problem is that I don't know if this is the correct approach to accomplish this, and if so, don't know how to access the data on this column to test if it has a value?
Can you point to an example or give me a short code snippet to get me going?
The datasource is feeding a listGrid.
Code:
isc.RestDataSource.create({ fetchDataURL: "/listPMF", addDataURL: "/createPMF", updateDataURL: "/updatePMF", removeDataURL: "/removePMF", dataFormat: "json", allowAdvancedCriteria: true, ID: "shopProdRestDataSource", fields: [ { name: "id", title: "id", primaryKey: true, hidden: true, }, { name: "src", title: "Image", type: "image", align: "center", canEdit: false, width: 85, imageWidth: 80, imageHeight: 80, }, { name: "title", title: "Title", canEdit: false, width: 230 }, { name: "key_3", title: "Customer Tag", canEdit: false, width: 100, [B]showIf: function(){return true} [/B]}, ] }
Comment