help me plz..
how to get cursor position in a active cell, when cell is in editmode.
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.
In that case couldn't you use the KeyUp event and check if the ActiveCell.IsInEditMode? If it's in edit mode, then you could use the ActiveCell.SelStart to grab the insertion point location.
Example:
http://help.infragistics.com/Help/NetAdvantage/NET/2008.1/CLR2.0/html/Infragistics2.Win.UltraWinGrid.v8.1~Infragistics.Win.UltraWinGrid.UltraGridCell~SelStart.html
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
Use the CellChange event of the grid, and then grid.ActiveCell.SelStart to get your insertion point location.