I am trying to use the sfDatagrid.Record contextMenu, but can't figure out how to add a function to the selected context menu. What I want is to pass the row index and column index into the Addcomment function, but am not sure what parameters should the RecordContextMenu take. Any help would be appreciated.
ContextMenuStrip recordContextMenu = new ContextMenuStrip();
recordContextMenu.Items.Add("Add Comment", null, AddComment);
sfDataGrid4.RecordContextMenu = recordContextMenu;
private void AddComment(int rowIndex, int colIndex)
{
form2 f1 = new form2(columnIndex, ID);
f1.ShowDialog();
}