Attach button to column datagrid in C# Compact Framework .Net 2.0

泄露秘密 提交于 2019-12-01 05:40:16

问题


I have a datagrid which has 4 columns, the first 3 are data and the last one needs to have a button in it to allow for the row to be deleted. I have searched for a good 2 hours now and haven't found any way to do this in the C# Compact Framework for .Net 2.0. Any advice would be great.

To clarify, I am looking for an answer as to whether buttons can be added as part of a column in a DataGrid in C# Compact Framework .Net 2.0. If it is possible examples would be great and pointers to resources on the specifics of how the code works even better.

DataGridViewButtonColumn does not work in CF 2.0

EDIT: Okay I have found a way of doing this but it is quite complicated, you need to over-ride the DataGridTextBoxColumn, there is a microsoft example with VB script that can be adapted for this purpose, hope this helps anyone in future! Link: http://support.microsoft.com/kb/318581


回答1:


As far as I know and you said, CF2.0 doesn't allow to add button column. Here is the way that I found as I was searching. Hope this helps.



来源:https://stackoverflow.com/questions/17596067/attach-button-to-column-datagrid-in-c-sharp-compact-framework-net-2-0

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!