I have a component which I named it ReportGrid inheriting the UltraDataGrid. I want to use the UltraCalcManager with the control but when I drop the CalcManager on the form that also containing the ReportGrid I get and exception when running the software. The exceptions message is :
Invalid reference //. Reference is empty.
Please help how can I solve the problem.
It sounds to me like your grid or some other control in the calculation network does not have a Name. Are you adding controls to the form at run-time without setting the Name property?
No,its just 3 easy steps.
1- Create a user control and inherit from ultragrid.
2- Drag it to the form.
3- Drag an ultraCalc to the form and Run.
And i get a runtime exception and program does not start.
You lost me on step one. A control can't be derived from both UserControl and UltraWinGrid. So are you deriving a class from the UltraGrid? Or Creating a UserControl and putting a grid on it?
It sounds like it's the former. So I tried this out and it works fine for me. I get no exception. In fact, I can't see how you could possibly get an exception following just these three steps, since the grid has no data source and there are no formulas to run, the CalcManager will do absolutely nothing.
I was using Component instead of UserControl and thats why i got error. I tried UserControl and instead of inheriting from UserControl inherit from UltraGrid and its working.
Thank You
I have the same problem as HRAHI.
I attached a solution reproducing the problem. If you replace the DerivedGrid by a standard UltraGrid, the problem does not occur.
The worst thing is that the grid does not even use the UltraCalcManager and the exception occurs at startup so if we use the UltraCalcManager on a form for another grid, the mere presence of the derived grid causes the exception to be thrown and the form is not shown.
Marcel Gosselin