DataGridTemplateColumn for individual control-column vs DataGridTextColumn

Posted by msfanboy on Stack Overflow See other posts from Stack Overflow or by msfanboy
Published on 2010-03-11T20:25:16Z Indexed on 2010/03/11 20:29 UTC
Read the original article Hit count: 359

Hello,

what is the difference, both works: DataGridTemplateColumn versus DataGridTextColumn

            <DataGridTemplateColumn Header="Homework">
                <DataGridTemplateColumn.CellTemplate>
                    <DataTemplate>
                        <RichTextBox >
                            <FlowDocument>
                                <Paragraph>
                                    <Run Text="{Binding Homework}"/>
                                </Paragraph>
                            </FlowDocument>
                        </RichTextBox>                     
                    </DataTemplate>
                </DataGridTemplateColumn.CellTemplate>
            </DataGridTemplateColumn>

          <DataGridTextColumn Header="Homework">
                <DataGridTextColumn.CellTemplate>
                    <DataTemplate>
                        <RichTextBox >
                            <FlowDocument>
                                <Paragraph>
                                    <Run Text="{Binding Homework}"/>
                                </Paragraph>
                            </FlowDocument>
                        </RichTextBox>                     
                    </DataTemplate>
                </DataGridTextColumn.CellTemplate>                   
            </DataGridTextColumn >

© Stack Overflow or respective owner

Related posts about datagridtemplatecolumn

Related posts about datagridtextcolumn