Hi All,
Do any one know how to place a XamDataGrid within a cell of a XamDataGrid?
Thanks
Prakash
Prakash,
You can use any ItemsControl. Maybe the best choice is ComboEditor. If you need to display data as a grid, you can use ListBox,ListView, etc.
Sample for such is: <Style TargetType="{x:Type igDP:CellValuePresenter}" x:Key="style">
<Setter Property="Template">
<Setter.Value>
<ControlTemplate>
<ListView ItemsSource="{TemplateBinding Value}"/>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
Hi Alex,
What you said is true I got the error StackOverFlow Exception when i was trying to do.
Can you me tell me any control which is similar to the grid so that i can bind my collection to it instead of using the XamDatagrid.
Thanks for the reply.
Hello Prakash,
You can do that by retemplating the CellValuePresenter and placing a XamDataGrid inside the ControlTemplate. We, however, do not recommend doing this, as this might probably cause StackOverflowException. The XamDataGrid consists of many nested elements and placing one in each cell will increase that number. Note that the WPF Framework has a limit of nested elements (I believe 255).
Depending on what you are trying to achieve, you might want to consider using different control for that.
Hope this helps.