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. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Object to the column.

Thread ID:





132332 Aug 26,2017 07:12 PM UTC Aug 29,2017 05:05 PM UTC ASP.NET Core 3
Tags: Grid
Asked On August 26, 2017 07:12 PM UTC

I have this grid:

<ej-grid id="FlatGrid" allow-sorting="true" allow-paging="true" show-summary="true">
                <e-datamanager json="ViewBag.dataSource" offline="true" cross-domain="true"></e-datamanager>
                <e-toolbar-settings show-toolbar="true" toolbar-items=@(new List<string>() {"excelExport","wordExport","pdfExport" })>


                    <e-column field="Name" header-text="Name" width="75"></e-column>
                    <e-column field="Cities" header-text="Cities" width="75"></e-column>

The problem is that every object has Cities as another object with city names. How can I display all of them for current user in the column cell Cities ?

Farveen Sulthana Thameeztheen Basha [Syncfusion]
Replied On August 28, 2017 01:00 PM UTC

Hi Customer, 

Thanks for contacting Syncfusion Support. 

We need some additional information to achieve your requirement. Could you please share us the following details given below. 

1.  Screenshot/ Video about your requirement that how you want to display the Grid. 

2. Do you want to display the Grid column as in the form of Relational Binding. 

3. Elaborate your requirement. 

The provided information will help us to analyze and provide you the solution as early as possible. 


Farveen sulthana T 

Replied On August 28, 2017 08:17 PM UTC

I am following the answer from here:


, but trying to implement it for Core MVC:

<script type="text/x-jsrender" id="InterestsTemplate">



            <ej-grid id="FlatGrid" datasource="ViewBag.DataSource">


                    <e-column field="Name" header-text="Name"></e-column>

                    <e-column header-text="Cities" Template=true TemplateID="CitiesTemplate"></e-column>



Data looks like  this:

[{"name":"Name 1","cities":[{"name":"City 1"},{"name":"City2"},{"name":"City3"}]}]
or 1 row from table can have alot of cities, which I want to put to its cell.

Farveen Sulthana Thameeztheen Basha [Syncfusion]
Replied On August 29, 2017 05:05 PM UTC

Hi Customer, 
We have checked your issue and bound the list of strings within a colum according to the KB. But we are unable to reproduce your reported problem at our end. Please refer to the code example:- 
<ej-grid id="FlatGrid" allow-paging="true" >  
    <e-datamanager url="/Home/DataSource" adaptor="UrlAdaptor"/>  
        <e-column field="ID" header-text=ID" is-primary-key="true"width="75"></e-column>  
        <e-column field="FirstName " header-text="First Name"></e-column>  
             <e-column field="LastName " header-text="Last Name"></e-column> 
        <e-column field="Address " header-text="Address" template="true" template-id="#template" ></e-column> 
     <script type="text/x-jsrender" id ="template"> 
         {{for Addresses}} 
            <span>{{>Address2}}</span><br /> 
         List<Person> Persons = new List<Person>(); 
        protected void Page_Load(object sender, EventArgs e) 
        private void BindDataSource() 
            List<Address> adrs1 = new List<Address>(); 
            adrs1.Add(new Address() { Address1 = "No: 417", Address2 = "1st street", City = "Aurora", Country = "Arapahoe", Zip = "80010" }); 
            . . . 
            List<Address> adrs2 = new List<Address>(); 
            adrs2.Add(new Address() { Address1 = "No: 378", Address2 = "3rd cross street", City = "Austin", Country = "Travis", Zip = "78701" }); 
            .  .  . 
            List<Address> adrs3 = new List<Address>(); 
            adrs3.Add(new Address() { Address1 = "No: 195", Address2 = "7th golden street", City = "Sandy", Country = "Salt Lake", Zip = "84070" }); 
            Persons.Add(new Person() { ID = 1001, FirstName = "John", LastName = "Beckett", Addresses = adrs1 }); 
            Persons.Add(new Person() { ID = 1002, FirstName = "Ben", LastName = "Smith", Addresses = adrs2 }); 
            Persons.Add(new Person() { ID = 1003, FirstName = "Andrew", LastName = "Fuller", Addresses = adrs3 }); 
            this.Grid.DataSource = Persons; 
        public class Person 
            public Person() 
            public Person(int id, string firstName, string lastName, List<Address> address) 
                this.ID = id; 
                this.FirstName = firstName; 
                this.LastName = lastName; 
                this.Addresses = address; 
            public int ID { get; set; } 
            public string FirstName { get; set; } 
            public string LastName { get; set; } 
            public List<Address> Addresses { get; set; } 
        public class Address 
            public string Address1 { get; set; } 
            public string Address2 { get; set; } 
            public string City { get; set; } 
            public string Country { get; set; } 
            public string Zip { get; set; } 
After following the above solution, still facing the same problem could you please share us the following details with us given below. 
1.Complete Grid Code example(both in server and client side) 
2. Screenshot/Video to replicate the issue. 
3. If possible, provide an issue reproducing sample or hosted link.  
4. Essential studio product version details. 
The provided information will help us to analyze and provide you the solution as early as possible. 
Farveen sulthana T 


This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

or the page will be automatically redirected to sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon