help me plz..
how to get cursor position in a active cell, when cell is in editmode.
thanks..
Use the CellChange event of the grid, and then grid.ActiveCell.SelStart to get your insertion point location.
when i select all text in a cell from left to right, then the cursor is on the last position,
ActiveCell.SelStart value is 0
then i select all text from right to left, then the cursor position is on the first position.
ActiveCell.SelStart value is 0 too.
So i can't use ActiveCell.SelStart value to check when i press left key, the cell move left only when cursor is on the first position in a cell.
Same also, when i press right key, the cell move right only when the cursor is on the last position in a cell.
Can u help me how to use this ActiveCell.SelStart to handle this ?
or is there another way..
Sorry for bad english. thanks
You need to use SelLength in addition to SelStart to determine what text is selected. This is exactly the same as the TextBox control.