We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

Spreadsheet Ribbon Functionality crashes when used within a Tab Control

Repro
Create a form and add a spreadsheet and spreadsheet ribbon control and link them together.
Start Application and select File menu option on ribbon results in menu appearing and dialog displaying.

Now Create a TabControl on the form 
Move the Spreadsheet ribbon and the spreadsheet into a  TabPage on the tab Control

Start Application and select File menu option on ribbon

ACTUAL RESULT
Crashes with a Null Reference Exception

Call Stack
System.NullReferenceException
  HResult=0x80004003
  Message=Object reference not set to an instance of an object.
  Source=Syncfusion.Tools.Windows
  StackTrace:
   at Syncfusion.Windows.Forms.BackStageView.GetBackStageBounds()
   at Syncfusion.Windows.Forms.BackStageView.ShowBackStage()
   at Syncfusion.Windows.Forms.BackStageView.set_IsVisible(Boolean value)
   at Syncfusion.Windows.Forms.Tools.RibbonControlAdvHeader.OnMouseDown(MouseEventArgs mea)
   at System.Windows.Forms.Control.WmMouseDown(Message& m, MouseButtons button, Int32 clicks)
   at System.Windows.Forms.Control.WndProc(Message& m)
   at System.Windows.Forms.ScrollableControl.WndProc(Message& m)
   at System.Windows.Forms.ToolStrip.WndProc(Message& m)
   at Syncfusion.Windows.Forms.Tools.RibbonControlAdvHeader.WndProc(Message& m)
   at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
   at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
   at System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
   at Syncfusion.Windows.Forms.Tools.Win32API.WindowsAPI.CallWindowProc(IntPtr wndProc, IntPtr hwnd, Int32 msg, IntPtr wparam, IntPtr lparam)
   at Syncfusion.Windows.Forms.Tools.NativeMessageHandler.DefProcessing(Message& m)
   at Syncfusion.Windows.Forms.Tools.NativeMessageHandler.CallWndProc(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
   at Syncfusion.Windows.Forms.Tools.NativeMessageHandler.WndProc(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
   at System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG& msg)
   at System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(IntPtr dwComponentID, Int32 reason, Int32 pvLoopData)
   at System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)
   at System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)
   at System.Windows.Forms.Application.RunDialog(Form form)
   at System.Windows.Forms.Form.ShowDialog(IWin32Window owner)
   at System.Windows.Forms.Form.ShowDialog()
   at CheckinManifest.MainForm.Button2_Click(Object sender, EventArgs e) in C:\Users\Spotty\source\repos\CheckinManifest\CheckinManifest\MainForm.vb:line 1932
   at System.Windows.Forms.Control.OnClick(EventArgs e)
   at System.Windows.Forms.Button.OnClick(EventArgs e)
   at System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent)
   at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
   at System.Windows.Forms.Control.WndProc(Message& m)
   at System.Windows.Forms.ButtonBase.WndProc(Message& m)
   at System.Windows.Forms.Button.WndProc(Message& m)
   at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
   at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
   at System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
   at System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG& msg)
   at System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(IntPtr dwComponentID, Int32 reason, Int32 pvLoopData)
   at System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)
   at System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)
   at Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.OnRun()
   at Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.DoApplicationModel()
   at Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.Run(String[] commandLine)
   at CheckinManifest.My.MyApplication.Main(String[] Args) in :line 81

EXPECTED RESULT
Display file menu same as when the controls are outside of container control.




Other functionality on the ribbon appears to work OK - but the file stuff, definately appears to be broken.

4 Replies

AR Arulpriya Ramalingam Syncfusion Team February 7, 2020 06:16 PM UTC

Hi Spotty, 
 
Greetings from Syncfusion. 
 
We could reproduce the scenario at our end and forwarded the same to our development team for further analysis to confirm the behavior on this use case. So, we need some more time to validate completely and update you the proper details on 11th February, 2020. 
 
Regards, 
Arulpriya 



GS Gokul Sainarayanan Syncfusion Team February 10, 2020 02:06 PM UTC

Hi Spotty

Thank you for contacting Syncfusion support.

We are able to reproduce the reported exception. We confirm this as a defect and logged a bug report. We will provide the patch in your 17.4.0.39 version on or before February 24, 2020. Meanwhile, you can track the status of the bug report through our below feedback link. Also please let us know incase you are using a different version.

Feedback link: https://www.syncfusion.com/feedback/11956/null-reference-exception-while-opening-the-backstageview-when-ribbon-is-placed

Regards,
Gokul S


ON Olety Nikhilesh Olety Nagendra Syncfusion Team February 24, 2020 01:29 PM UTC

Hi Spotty,
 
Sorry for the inconvenience caused.
 
The current architecture of RibbonControlAdv works with the basics of getting parent Form directly from the BackStageView. But when using inside a TabControl we are facing some hurdles while getting the Form, due to this and some other complexities, it is taking more time than previously expected. We will fix and ensure in all cases and will provide you patch on March 3, 2020.
  
We appreciate your patience until then. 
  
Regards, 
Nikhilesh O
  
  



ON Olety Nikhilesh Olety Nagendra Syncfusion Team March 3, 2020 02:27 PM UTC

Hi Spotty,

Sorry for the inconvenience caused.

We are still facing multiple issues when trying to get the BackStage in TabControl since the RibbonControlAdv and BackStage are optimized to work directly under the form, but currently we have fixed the reported null reference exception when clicking the File Button ( Backstage button ). Please find the patch for this from below location.

Note: We are considering the requirement "Displaying the BackStage inside a TabControl" as an improvement, we will implement this internally and we will let you once it is completed.

Recommended approach - exe will perform automatic configuration
Please find the patch setup from below location:
http://syncfusion.com/Installs/support/patch/17.4.0.39/1113341/F151321/SyncfusionPatch_17.4.0.39_1113341_3032020075338840_F151321.exe 

Advanced approach – use only if you have specific needs and can directly replace existing assemblies for your build environment
Please find the patch assemblies alone from below location:
Assemblies linkhttp://syncfusion.com/Installs/support/patch/17.4.0.39/1113341/F151321/SyncfusionPatch_17.4.0.39_1113341_3032020075338840_F151321.zip 

Nuget link: http://syncfusion.com/Installs/support/patch/17.4.0.39/1113341/F151321/SyncfusionNuget_17.4.0.39_1113341_3032020075338840_F151321.zip 

Assembly Version: 17.4.0.39
Installation Directions :
This patch should replace the files Syncfusion.Tools.Windows under the following folder.
$system drive:\ Files\Syncfusion\Essential Studio\$Version # \precompiledassemblies\$Version#\4.6
Eg : $system drive:\Program Files\Syncfusion\Essential Studio\17.4.0.39\precompiledassemblies\17.4.0.39\4.6

To automatically run the Assembly Manager, please check the Run assembly manager checkbox option while installing the patch. If this option is unchecked, the patch will replace the assemblies in precompiled assemblies’ folder only. Then, you will have to manually copy and paste them to the preferred location or you will have to run the Syncfusion Assembly Manager application (available from the Syncfusion Dashboard, installed as a shortcut in the Application menu) to re-install assemblies.

Note :
To change how you receive bug fixes, ask your license management portal admin to change your project’s patch delivery mode.

https://www.syncfusion.com/support/directtrac/patches

Disclaimer :
Please note that we have created this patch for version 17.4.0.39 specifically to resolve the following issue reported in the forum 151417.

If you have received other patches for the same version for other products, please apply all patches in the order received.

Regards,
Nikhilesh O


Loader.
Up arrow icon