Edit bar

I'm trying to write a control similar to the excel forumla bar. I want text editing in the text box to be reflected in the current cell in a grid. I'm using a virtual grid.

I'd like to do something like

textBox_textchanged(...)
{
if(currentCell.IsEditing==false)
{
currentCell.BeginEdit();
}

//Set current cell edit text
}

textBox_Leave(...)//Or Enter Key
{
if(currentCell.IsEditing)
{
currentCell.EndEdit()
}
}

My logic may not be complete I still have to handle the esc key etc. But I can't figure out how to set the editing text without actually altering the GridStyleInfo for the current cell. Any help would be appreciated.

Thanks


1 Reply

JA Jay March 1, 2008 03:29 AM UTC

You can use the GridAwareTextBox control to do this. Please take a look at this sample:

\Documents\Syncfusion\EssentialStudio\6.1.0.34\Windows\Grid.Windows\Samples\2.0\FormulaSupport\FormulaGrid\


Loader.
Up arrow icon