Custom Formulabar

I have to create a custom formula bar. So far, entering data in the formula bar and apply to GridDesktop ActiveWorksheet is not a problem.


However, entering characters directly into a focused cell with the keyboard is. How do I capture the key event occurring in the cell and mirror that in my custom formula bar? The GridDesktop_KeyDown and GridDesktop_CellKeyPressed and GridDesktop_CellDataChanged do not work for this.

I need to mirror in my custom formulabar exactly what the user is typing in a focused cell before the value is assigned to the cell (which then would be cell.Value and easy).

Thanks.

Hi,


Thanks for providing us some details.

Aspose.Cells.GridDesktop also provides FormulaBar control which is included in the Aspose.Cells.GridDesktop library that you may add it from the Toolbox in VS.NET. You may select Choose Items to add the control in the ToolBox with Aspose.Cells.GridDesktop control. You may bind it by using FormulaBar’s “GridDesktop” property at design time for your needs.

Thank you.

I realize that but your documentation of it is very sparse and what is that annoying combo box on the left?


Anyways, it doesn’t fit my look, can you please answer my question.

Thanks!

Hi,


Well, in FormulaBar, the left combo box is a Name Box similar to what Ms Excel has, it gives you details on which cell is focused in the sheet etc.

And, I have tested GridDesktop’s CellKeyPressed and it gives me correct value which is pressed in a cell.

e.g
Sample code:
private void _grid_CellKeyPressed(object sender, CellKeyEventArgs e)
{
MessageBox.Show(e.KeyCode.ToString());
}

If you still find any issue, kindly create a sample WinForm application (runnable) with Aspose.Cells.GridDesktop v8.4.1, zip it and post us here to show the issue, we will check it soon.

Thank you.