User (Legacy) Posted February 20, 2007 Report Share Posted February 20, 2007 Is there a way through code to put a datagrid cell into edit mode? For this specific scenario I want to put a datagrid cell into edit mode with a single mouse-click. Thanks! Link to comment Share on other sites More sharing options...
Frank Posted February 21, 2007 Report Share Posted February 21, 2007 There is no API that put the datagrid into edit mode. The follwoing will do it but it uses internal, undocumented API that may change in future versions and it is not supported. Use it at your own risk private void chart1_MouseClick (object sender,HitTestEventArgs e) { if ((e.HitType == HitType.DataGrid) && (e.Series >= 0) && (e.Point >= 0)) { MouseEventArgs me = new MouseEventArgs(MouseButtons.Left,2,e.X,e.Y,0); ((ChartFX.WinForms.Internal.IDockableBarMouse) chart1.DataGrid).OnMouseDown(me); e.Handled = true; } } Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.