Hi Mats,
Thanks very much for your feedback!
Based on my understanding, you want to add customized control to the normal
cell of DataGrid, not only the current cell in edit mode.
I think your requirement is somewhat like DataGridBoolColumnStyle, which
always show a checkbox in each cell in that column. But I will tell you
that, actually, these checkboxes in the normal cell is not a "true"
checkbox. DataGrid only paints a checkbox image to that cell. There is not
an actual checkbox in that cell.
So ,there is no build-in way to get this done. What we can do is simulate
the DataGridBoolColumnStyle, that is: override DataGridColumnStyle.Paint
method, just draw a control like image to each cell.(Because when every row
cell in a column need to be paint, Paint will be called).
However, painting the richtext content is not an easier job. So I suggest
you change your design to use the standard option, only add the RichTextBox
in current editing mode cell, actually, this is the offical supported way
for DataGridColumnStyle.
=============================================
Thank you for your patience and cooperation. If you have any questions or
concerns, please feel free to post it in the group. I am standing by to be
of assistance.
Best regards,
Jeffrey Tan
Microsoft Online Partner Support
Get Secure! -
www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.