Icon View Thread

The following is the text of the current message along with any replies.
Messages 1 to 2 of 2 total
Thread Show grid column editor using code
Fri, Jun 24 2016 7:18 AMPermanent Link

thomh

Hello,

I am using the following code to try to place the cursor on a specific column in a grid and toggle the editor.
The column ControlType is of type ctedit:

   Grid1.SetFocus;
   Grid1.SetToColumn(Grid1.Columns['colVoDt'].Index);
   Grid1.ShowColumnControl;
   Grid1.ToggleSelected(Grid1.RowIndex);

It does place it in the correct column and shows the editor.
However, the cursor does not show in the cell.

What is the proper way to select a grid column and toggle the editor using code?

Thanks.

// Thom
Tue, Jun 28 2016 9:28 AMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

Thom,

<< It does place it in the correct column and shows the editor. However, the cursor does not show in the cell. >>

This should work:

   Grid1.SetToColumn(Grid1.Columns['GridColumn2'].Index);
   Grid1.SetFocus;
   Grid1.ShowColumnControl;

But, keep in mind, the grid will select the entirety of the column's edit control, so you won't exactly *see* the cursor.

Tim Young
Elevate Software
www.elevatesoft.com
Image