This thread looks to be a little on the old side and therefore may no longer be relevant. Please see if there is a newer thread on the subject and ensure you're using the most recent build of any software if your question regards a particular product.
This thread has been locked and is no longer accepting new posts, if you have a question regarding this topic please email us at support@mindscape.co.nz
|
Hi, I want to use WPF Toolkit Datagrid as a custom collection editor within the Mindscape property grid. Lets say, I have a collection of Persons inside the property grid, which when expanded I want to show as a datagrid, for example: Collapsed Preperty1 | Value1 + Persons | Preperty2 | Value2
Expanded Preperty1 | Value1 - Persons | Name | Age | Address Alice | 32 | 234 SAve Bob | 56 | 123 NAve Preperty2 | Value2
So far, after looking at other examples, I am able to display the collection contents as datagrid using EditorTemplate, but the problem is that it only displays in the propertygrid's value column for the collection. I want to be able to display the datagrid underneath the Persons row, and spanning across both name and value propertygrid columns. Is that possible? Thanks in advance, ilian |
|
|
That isn't directly possible. The property grid expects to be showing name-value pairs: it doesn't provide any direct way for the "values" (the editor) to take over the space for names. It might be possible you could do this by retemplating the grid, but it would involve a pretty fundamental rewrite. The default template is based on the TreeListView, which uses GridView components to lay cells out in columns. And as far as I know GridView doesn't provide a way to say that a given cell should extend across multiple columns. So to get the effect you want, you'd need to go below the level of TreeListView and GridView: not impossible, but a lot of work I think. A possible alternative might be to hack around it by using the Margin property to extend the DataGrid over the left hand column. Be warned however that the property grid is very greedy about mouse events near the resize bar so you will probably need additional code to detect when the user is in the grid and disable resizing while this is the case. If you go this route and run into this problem then see http://www.mindscape.co.nz/forums/Thread.aspx?PostID=7156 for info. |
|