Hi All
I am adding UltraTextEditor to one of the GridColumn like
UltraTextEditor emailEditor = new UltraTextEditor();
emailEditor. TextChanged += new EventHandler(OnEdit);
void OnEdit(sender, e)
{
--------
}
ultraColumn.EditorControl = emailEditor;
since, i am placing text editor for the column, i expect anychange in editor OnEdit should get called...but this is not happening
Can any one please explain the concept behind?
I believe the problem is that the grid creates it's own instances of a control associated with a grid column. So creating an event handler outside of the grid is not going to ever capture that change event. Technically you don't even really have to create a seperate text editor unless you are trying to do something out of the ordinary because the grid will create one by default if the source column is a text field. From the code you are showing it looks like you would be more inclined to use the cell events on the grid.
I didn't understand the purpose of accepting textbox as EditorControl for the cell? when it is not serving event handlers right? Yes, i have to have some functionality executed while editing happens....independent to grid
Well associating a vanilla textbox as the editor of a text data type grid column doesn't really buy you anything unless you are doing something special. I have an application where I made a numeric control the editor of a numeric field, but I had added a button to it and I had it performing a task. Natively the grid wouldn't have shown that button on the default numeric editor that the grid would have used for that field.
I think the real purpose of using an control as a field editor is if you need some form of special functionality other than what you would get otherwise.