Parent class of property

Hi,

we have a GGC which is bound to a business object. Furthermore we have implemented a custom cell renderer for that object. Now consider the following class as the business object:

public class Test
{
private string m_Value;
public string StringValue
{
get; ...
set; ...
}

.... Further Functionallity ...
}

During the initialization of the grid we add several gridcolumndescriptor objects with mapping to the business datasource. So our "Test" class is bound via "Property_StringValue" the "_StringValue" is because of we want to bind to that property.

So in our OnInitialize method of our custom cell renderer we get the current cell value via:

Grid.Model[RowIndex, ColIndex].CellValue

and this is of course of type string (because the StringValue property is of type string). Now how can I find out to which this nested property belongs -> In our example I want to get the corresponding parent object ("Test" class).

Any ideas?

Cheers,
Tom

1 Reply

HA haneefm Syncfusion Team July 2, 2007 08:01 PM UTC

Hi Tom,

How can I find out to which this nested property belongs?
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
You can try these code :

GridTableControl tc = this.Grid as GridTableControl;
Type type = tc.TableDescriptor.Fields["Test_StirngProperty"].GetParentFieldDescriptor().FieldPropertyType;
Console.WriteLine("Property Type=" + type);

Best regards,
Haneef

Loader.
Up arrow icon