Hello,
I have a data source like:
var dataSource = [
{
User: {
ID: '123',
Name: {
First: 'Jack',
Last: 'Doson'
}
]
I want to show it in an igGrid, primary key is User.ID, column 'UserID' is User.ID, column 'UserName' is 'User.Name.First + User.Name.Last'.
How can I do it? Thanks!
Still don' tknow how to display First + Last.
What is the 'val' in the formatter function?
Let me know if I may be of further assistance.
Thank you for contacting us.
About your question, basically you can, you can specify responseDataKey to be "User" and after that to use column formatter in order to combine first and last name, although I do not recommend you to use this approach, because it is a lot difficult to implement and my suggestion is to use igHierarchicalGrid. This grid is suppose to work with this kind of data, not the igGrid.
Useful references:
http://help.infragistics.com/jQuery/2014.1/ui.iggrid#options
http://help.infragistics.com/jQuery/2014.1/ui.ighierarchicalgrid
Code snippet:
Looking forward to hearing from you.