3

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

Cookie
  • 558
  • 8
  • 24

1 Answers1

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.

Burak Karakuş
  • 1,368
  • 5
  • 20
  • 43
  • Thanks, the link pointed me in the right direction, I need to draw the button myself apparently. Will update the answer with code when I have it ready. Thanks again. – Cookie Jul 12 '13 at 09:00