Hello,
I have
Table structure like
Employee
{
string FirstName;
string LastName;
string MiddleName;
Address address;
}
Address
{
sring City;
string State;
}
Now using jqxGrid. I need to display City and State also in my grid
I am able to display FirstName and LastName.
var source = {
datatype: “json”,
datafields:
[
{ name: ‘FirstName’ },
{ name: ‘LastName’ },
{ name: ‘BirthDate’, type: ‘date’ },
{ name: ‘City’},
{ name: ‘State’ },
],
url: ‘Employee/GetAllEmployeeDetails’
};
$(“#jqxgrid”).jqxGrid({
source: source,
theme: ‘classic’,
sortable: true,
width: 600,
autoheight: true,
pageable: true,
columnsreorder: true,
columns:
[
{ text: ‘First Name’, datafield: ‘FirstName’, width: 150 },
{ text: ‘Last Name’, datafield: ‘LastName’, width: 150 },
{ text: ‘Birth Date’, datafield: ‘BirthDate’, width: 100, cellsformat: “dd/MM/yyyy” },
{ text: ‘City’, datafield: ‘City’, width: 100 },
{ text: ‘State’, datafield: ‘State’, width: 100 }
]
});
Please suggest me how could I proceed to show City and State data in my grid?
Regards
Ashish