I have a jqxGrid and I need to populate it with some object. The object is completely random that some data fields may be empty. I need to show a particular coloumn only if that data is present in that object.
columns: [
{ text: 'Application Id', filtertype: 'input', datafield: 'ApplicationId', cellsrenderer: AppIdRenderer, width: appId },
{ text: 'Name', columntype: 'textbox', filtertype: 'input', datafield: 'ApplicantName', width: Applicant },
{ text: 'Submitted Date', datafield: 'SubmitDate', filtertype: 'date', cellsalign: 'left', cellsformat: 'dd/MM/yyyy', width: ApplDate },
{ text: 'Last Action', datafield: 'LastActionDate', filtertype: 'date', cellsalign: 'left', cellsformat: 'dd/MM/yyyy', width: ApplDate },
{ text: 'University', columntype: 'textbox', filtertype: 'checkedlist', datafield: 'AppType', width: UTYApplied },
{ text: 'Course Applied', columntype: 'textbox', filtertype: 'checkedlist', datafield: 'AppliedCourse', width: ApplCourse },
{ text: 'Latest Comments', columntype: 'textbox', filtertype: 'input', datafield: 'LatestComments', width: ApplCourse },
{ text: 'AppStatus', datafield: 'AppStatus' },
{ text: 'Status', columntype: 'textbox', filtertype: 'checkedlist', datafield: 'Status', width: ApplCourse }
]
for eg: I need to show the coloumn "LatestComments" only if the datafield "LatestComments" occurs.