Is it possible for the grid output a blank cell for columns that don't have data for a few records? For example i have the following json -
[{id:4123, name:'ted', city:'chicago'},
{id:4126, name:'bob', city:'manchester'},
{id:4123, name:'ted'}
I would like the grid to produce three rows in this case and the city column of the third row should output a blank cell. Is this possible?
Hello adil sulaiman,
Thank you for posting in our forums!
It is possible to achieve this with the igGrid. The igGrid will interpret any missing data as null and display an empty cell. You can see a jsfiddle that demonstrates this here.
If you have any further questions or concerns with this, please let me know and I will be glad to help.
Is this valid for a remote datasource? I dont have a json array datasource its a url. When i try to do the same with a remote datasource it hits me with the following error:
Uncaught Error: There was an error parsing the JSON data and applying the defined data schema: The input data doesn't match the schema, the following field couldn't be mapped:
This forum post describes this issue in regards to remote datasources as a bug.
The fix for this bug is available in the latest Service Releases for IgniteUI 13.2 and 14.1.
These service releases are available under your account at the Infragistics Website. To download the service release, log in to ‘Account’ and select ‘Keys & Downloads’. Select the Dev Tools tab and then click on the product name. Finally, select the 'Service Releases' tab and the available service releases will be listed below.
The service releases that resolve this issue were released before 14.2 was released which means this issue still occurs in 14.2.
Please let me know if you need further assistance with this issue.
I am running version 14.2 and the grid still spits out a dataschema mismatch error when it cant find data for a particular column.
i see that this is done via a formatter function. Question how can i do this in angularjs? (https://github.com/IgniteUI/igniteui-angular)
UPDATE: By setting localSchemaTransform to false, i was able to rid myself of that error. However columns which are nested within objects in my json do not show any data. For example:
[ { "Name": { "firstName": "John", "lastName": "Smith"}, "Age": 45 }, { "Name": { "firstName": "John", "lastName": "Smith"}, "Age": 32 }, { "Name": { "firstName": "John", "lastName": "Smith"}, "Age": 27 } ]
In this case firstName and lastName does not get mapped to anything even though i bind them to Name.firstName and Name.lastName.