My first question is - why are you using an editor? If your column's DataType is DateTime, the grid will automatically display it as such. If not, then using a DateTime editor probably won't work, anyway, since it won't know how to deal with the DataType you are using that isn't a DateTime.
I'm still not sure I understand your question. There's really not enough information here for me to even guess what you are trying to do, much less determine what is wrong.
I don't see anything in your post that indicates why you need to use an editor to acheive what you want to do, but assuming there is a reason, I'm still not sure what you are doing. Are you using an Editor or EditorControl? When you say "the control is not in edit mode", which control are you talking about? If you click into a grid cell then there is no control that should be in edit mode at that point, only the grid cell would be in edit mode.
There is certainly no reason why you should ever have to force a control into edit mode as far as I can see.
I have an ultrawingrid that is used to track an employees time. Two of the many columns in the grid are a start and stop time. Within both of these columns I have set an Editor Control. The editor control is the ultradatetime editor. I have chosen this editor because of its masking abilities and I wanted the user to have the ability to press the numPad + or - keys to specify AM or PM. In order to do this i was trying to acces the ultradatetime editors Editor.CurrentEditText property and was modifying the text as needed, either adding AM or PM to the end of the string. I know that it works just fine using the p and a keys, but we require that the person uses the keypad to navigate the grid.
Everything works fine on the first row. But on the second row, whenever we get to the start column it appears that the ultradatetime editor is in edit mode, when in fact the IsInEditMode property is set to false. This then prohibits me from accessing the CurrentEditText property and i receive an error saying that the editor must be in edit mode. Next we tried to use the Editor.EnterEditMode method but we found that it lacked the documentation to use it. If you should never have to force a control into edit mode, then why have the method. In my case, I am clearly typing in the editor control and the IsInEditMode property is set to false. I think that seems a bit strange and I figured that somone might want to know about it. I dont know if this will help you understand the situation better, but once again we have worked around it.
tbird said:In my case, I am clearly typing in the editor
control and the IsInEditMode property is set to false.
Okay, I think you may be getting confused about how editors work. If you are typing into a cell in the grid, then you are not typing into
the editor control at all. One thing has nothing to do with the other.
When you assign an EditorControl to a grid column or cell, the grid does not use the Control itself. The control (in this case the DateTimEditor) merely provides a copy of it's internal editor for use in the grid. So if you are checking to see if the DateTimeEditor control is in edit mode, then this is not going to work. You need to be looking at the grid cell, not the editor control.
You should not have to explicity call any method to put anything into edit mode. Nor do I see anything you describe here that would require you to use an editor control. I think the EditorControl property is probably just distracting you from the real functionality you need to implement. The grid already has masking capability built-in. It also has key events so you could trap the + and - keys to modify the cell value. Using an EditorControl does not seem to provide any benefit to you in acheiving the functionality you want here as far as I can tell.