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 : Nov 16th 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

DataBinding to custom object

Thread ID:

Created:

Updated:

Platform:

Replies:

59880 Apr 24,2007 10:24 AM UTC Apr 24,2007 05:47 PM UTC WinForms 1
loading
Tags: GridControl
Tom T.
Asked On April 24, 2007 10:24 AM UTC

Hi,

we are using a GGC which is bound to a custom object. The custom object implement IBindingList.

So for example we have the follwing object:

public class MyTable: BindingList, ITypedList
{

}

so the corresponding "MyRow" class looks something similar like this:

public class MyRow
{
string Name
{
get;
set;
}

CustomObject Data
{
get;
set;
}
}

So the problem occurs for the "Data" property because this is not a native type.

The CustomObject class looks something similar like this:

public class CustomObject
{
private double myValue;

public string StringValue
{
get;
set;
}
}

So in the binding we set for the mapping name (for the column) "Data_StringValue" now the StringValue appears in the cell. How can I get the parent property for the field "Data_StringValue". I can only get the parent FieldDescriptor with GetParentFieldDescriptor - but I want the parent property so "Data" instead of "Data_StringValue".

Thanks,
Tom



haneefm [Syncfusion]
Replied On April 24, 2007 05:47 PM UTC

Hi Tom,

If you want to hide the inner most property field of the custom object then set the Engine.ShowNestedPropertiesFields to false. Here is a code snippet

this.gridGroupingControl1.Engine.ShowNestedPropertiesFields = false;

Best regards,
Haneef

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.

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

;