Hi martin,
Thank you for posting in the community! My name is Jeffrey, and I will be
assisting you on this issue.
Is your datagrid WinForm based or Web Form based? I suppose you want to do
in Windows Form.
Based on my understanding, you want to implement different columns in the
datagrid for different data types.
================================================== ==========
In WinForm, DataGrid uses different column style to display data.
There are 2 already made concrete column styles: DataGridBoolColumn and
DataGridTextBoxColumn. These 2 column styles both inherited from
DataGridColumnStyle abstract class.
You can create your own datagrid column style for your data source. You
need to override some of the DataGridColumnStyle's class and do your
customized operations(Such as paint, etc)
Please refer to the article below to find a sample:
http://www.codeproject.com/cs/miscct...datagrid%7Ccol
umn
Also, there is a sample code in MSDN document of DataGridColumnStyle class,
please refer to:
http://msdn.microsoft.com/library/de...us/cpref/html/
frlrfsystemwindowsformsdatagridcolumnstyleclasstop ic.asp
================================================== =========
Please apply my suggestion above and let me know if it helps resolve your
problem.
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.
Have a nice day!!
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.