views:

1033

answers:

1

Is it possible to add a button to a column in the DataGrid for the compact framework? So far the only thing I can find is you can add textbox and that's it. What would be a good alternative to a DataGrid that can allow other controls?

+3  A: 

You can use the DataGrid's

public Rectangle GetCellBounds(int row, int col);

with

public event EventHandler CurrentCellChanged;
public DataGridCell CurrentCell { get; set; }

or

public event MouseEventHandler MouseMove;
public HitTestInfo HitTest(int x, int y);

to show a Button (or another control) over the selected cell.

Regards, tamberg

tamberg