We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

Access array value in grid

    <ej-grid #grid id="Grid"
        <e-column field="recommendations[0].prop1" headerText="prop1"></e-column>   
        <e-column field="recommendations[0].prop2" headerText="prop2"></e-column>          

Not sure how to implement something like this, structures is like this

data= [
          recommendations: [
               prop1: 'hello',
               prop2: 'goodbye'

1 Reply

TS Thavasianand Sankaranarayanan Syncfusion Team April 19, 2017 05:00 PM UTC

Hi Zack, 

Thanks for contacting Syncfusion support. 

We have analyzed your query and we suspect that you want give dataSource for the ejGrid control. 

Refer the below code example. 


<ej-grid id="Grid" #grid  [dataSource]="data" [allowPaging]="true"> 
        <e-column field="EmployeeID"  headerText="Employee ID"  ></e-column> 
        <e-column field="OrderID" headerText= "Order ID" ></e-column> 

export class AppComponent { 
    public data = [ 
        { OrderID: "10248", EmployeeID: 1 }, 
        { OrderID: "10249", EmployeeID: 2 }, 
        { OrderID: "10250", EmployeeID: 3 }         

Refer the help documentation. 

Thavasianand S. 

Live Chat Icon For mobile
Up arrow icon