BoldSignA modern eSignature application with affordable pricing. Sign up today for unlimited document usage!
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
|