DataGrid1.attributes.add ("OnContextMenu", "Function of Your Generation Menu Writing here") Simple example