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.
Unfortunately, activation email could not send to your email. Please try again.

List of objects

Thread ID:

Created:

Updated:

Platform:

Replies:

132666 Sep 14,2017 10:46 AM Sep 15,2017 10:18 AM Windows Forms 1
loading
Tags: GridListControl
Richard Mountain
Asked On September 14, 2017 10:46 AM

I'm passing a list of objects as the DataSource, however within the object there are some relationships with other objects and rather than pulling the related ids I want to display another field from the relationship.

Hope this makes sense :)

Also I don't want to display all fields from the DataSource is there a way to specify which columns I want visible?

Mohanraj Gunasekaran [Syncfusion]
Replied On September 15, 2017 10:18 AM

Hi Richard, 

Thanks for using Syncfusion product. 

Query 
Solution 
I'm passing a list of objects as the DataSource, however within the object there are some relationships with other objects and rather than pulling the related ids I want to display another field from the relationship. 
By default, GridListControl do not have the direct support to individual binding for columns. So, we cannot create separate columns based on the inner level objects. So, you should generate the DataTable or collection based on your requirement (to get the date based on the relationship id) then try bind that collection with datatable. 

Note: 
GridGroupingControl does have support to bind the inner level object which will automatically generate the RelationTable.  

Also I don't want to display all fields from the DataSource is there a way to specify which columns I want visible? 
In order avoid the specific fields binding with GridListControl you can use Browsable attribute as false. Please refer to the below code example, 

Code example 
//To avoid the below property to bind with GridListControl 
[Browsable(false)] 
public String SampleData 
{ 
    get 
    { 
        return this.sample_Data; 
    } 
    set 
    { 
        this.sample_Data = value; 
    } 
} 

Note: 
The above case applicable for GridGroupingControl also and GridGroupingControl does have the support to remove the column from visible using VisibleColumns property. Please refer the below UG link, 

UG link:  
Binding the data with GridGroupingControl: 
 
Hide the Columns in GridGroupingControl 
 

Please let us know if we misunderstood your scenario. 

Regards, 
Mohanraj G 




CONFIRMATION

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.

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.

;