R – How to add a button to a compact framework DataGrid

compact-frameworkwindows-mobile

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?

Best Answer

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

Related Topic