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.
Syncfusion Feedback

Parent class of property

Thread ID:

Created:

Updated:

Platform:

Replies:

63305 Jul 2,2007 09:18 AM Jul 2,2007 04:01 PM Windows Forms 1
loading
Tags: GridControl
Tom
Asked On July 2, 2007 09:18 AM

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

haneefm [Syncfusion]
Replied On July 2, 2007 04:01 PM

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

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

;