FlexReport - change margin/orientation event

Posted by: brezodejan on 17 October 2019, 6:59 am EST

  • Posted 17 October 2019, 6:59 am EST

    Hello guys,

    I use C1FlexReport and C1FlexViewer in Windows Forms. I want to save margin and orientation when user sets up it.
    What is appropriate event I could use to detect if user sets up margin or orientation in C1FlexViewer?
  • Marked as Answer

    Replied 17 October 2019, 9:34 pm EST

    Hello,

    PropertyChanged event of the FlexViewer can be used to get the name of the property changed each time.
    http://help.grapecity.com/componentone/NetHelp/FlexReport/webframe.html#C1.Win.FlexViewer.4~C1.Win.FlexViewer.C1FlexViewer~PropertyChanged_EV.html
    In this case, the property returned for change of the orientation/margins from the viewer, is PageSettings. As margins and orientation related settings are a part of PageSettings, this is the main property returned, along with the other viewer specific properties like HasPages, PageSetCount, PageCount, etc. This is done using the PropertyName property of the event arguments, as follows:

      private void c1FlexViewer1_PropertyChanged(object sender, PropertyChangedEventArgs e)
    {
    String prop = e.PropertyName;
    Console.WriteLine(prop+ " \n");
    }


    There is no other way to trigger an event specifically for the changes made to orientation and margins.

    Regards,
    Esha
Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels