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

Emulating the Windows Forms PropertyGrid

Thread ID:

Created:

Updated:

Platform:

Replies:

19106 Sep 17,2004 12:24 PM UTC Sep 20,2004 11:51 AM UTC Windows Forms 4
loading
Tags: GridControl
Mike Woolley
Asked On September 17, 2004 12:24 PM UTC

I need to build a control that emulates the Windows Forms PropertyGrid using Syncfusion grids. I''d thought about using the GridGroupingControl, etc. but it strikes me that there may be a better way to do this. Assuming that I can control the type, colour etc. of a cell in the right-hand column of a GridListControl, I guess that I can use multiple of these embedded within cells in an outer grid. The question is, can I emulate the expand/contract row behaviour of the standard windows control easily, and do you have any samples that I could look at? Many thanks!

Administrator [Syncfusion]
Replied On September 17, 2004 02:33 PM UTC

>>The question is, can I emulate the expand/contract row behaviour of the standard windows control easily, and do you have any samples that I could look at? The operative word here is ''easily''. Right now I would say the answer is no. You do have to do significant work to get this functionality UNLESS you can express your data in some kind of hiearchical format that can work with a GridDataBoundGrid as in the grid\samples\databound\hierarchical\expand sample (or customer sample). If you can do this, you can get the expand/contract using that grid in a straight forward way. It you want to show flat data in some ''related to'' relation among the items in teh flat table, there is no grid that directly supports this as of now. We will support this type of things in the next few months. If you want to do something now, there are several ways to go about this. One is use something along the way of the grid\samples\indepth\virttreegrid sample. But you would have to express your data in something like the collapsible datasource used there.

Mike Woolley
Replied On September 20, 2004 07:23 AM UTC

Thanks for your hints. I imagine that it shouldn''t be too difficult to express the data in a hierarchy, so I''ll explore the virttreegrid example more closely.

Administrator [Syncfusion]
Replied On September 20, 2004 08:31 AM UTC

If you can get it in a hierarchy, then you might want to look at both the \2.1.0.9\Grid\Samples\DataBound\Hierarchical\ExpandGrid and \2.1.0.9\Grid\Samples\DataBound\Hierarchical\GDBGTreeLines samples.

Mike Woolley
Replied On September 20, 2004 11:51 AM UTC

So far so good. I''ve managed to reduce things into a parent/child relation. However, I''m getting the following exception when I try to expand the child table.. ystem.ArgumentException: The relation is not parented to the table to which this DataView points. at System.Data.DataView.CreateChildView(DataRelation relation, Int32 recordIndex) at System.Data.DataRowView.CreateChildView(DataRelation relation) at System.Data.DataRelationPropertyDescriptor.GetValue(Object component) at Syncfusion.Windows.Forms.Grid.GridModelDataBinder.GetChildList(PropertyDescriptor relation, Object component) at Syncfusion.Windows.Forms.Grid.GridModelDataBinder.ExpandRecord(Int32 gridPosition) at Syncfusion.Windows.Forms.Grid.GridDataBoundGrid.ExpandAtRowIndex(Int32 rowIndex) at Syncfusion.Windows.Forms.Grid.GridDataBoundGrid.OnCellButtonClicked(GridCellButtonClickedEventArgs e) at Syncfusion.Windows.Forms.Grid.GridControlBase.RaiseCellButtonClicked(Int32 rowIndex, Int32 colIndex, Int32 index, GridCellButton button) catched at Syncfusion.Windows.Forms.Grid.GridControlBase.RaiseCellButtonClicked(Int32 rowIndex, Int32 colIndex, Int32 index, GridCellButton button) in :line 0 As far as I can see, the code I have is a direct copy from your sample. Any ideas what might be wrong here?

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

;