Loading a predefined fpSpread as SubEditor

Posted by: j2associates on 8 September 2017, 12:46 pm EST

  • Posted 8 September 2017, 12:46 pm EST

    <P>Hello,</P>
    <P>In one of the support chats, the following was posted in response to a question regarding SubEditors.</P>
    <P>You can design the look you want for this Spread control in designer, save out as spreadsheet xml file and then load it in the SubEditorOpening event.</P>
    <P>I'm not sure exactly what steps I need to take in the above scenario.</P>
  • Replied 8 September 2017, 12:46 pm EST

    <P>Hello,</P>
    <P>There is a Save button in the Spread Designer that will save the spreadsheet as xml. Then, you can add code like the following to load this into the SubEditor of the MultiColumnComboboxCellType.</P> <PRE class=coloredcode> <SPAN class=kwd>Private Sub</SPAN> FpSpread1_SubEditorOpening(<SPAN class=kwd>ByVal</SPAN> sender <SPAN class=kwd>As Object</SPAN>, <SPAN class=kwd>ByVal</SPAN> e <SPAN class=kwd>As</SPAN> FarPoint.Win.Spread.SubEditorOpeningEventArgs) <SPAN class=kwd>Handles</SPAN> FpSpread1.SubEditorOpening
    <SPAN class=kwd>Dim</SPAN> ss <SPAN class=kwd>As</SPAN> FarPoint.Win.Spread.FpSpread = <SPAN class=kwd>CType</SPAN>(e.SubEditor, FarPoint.Win.Spread.FpSpread)
    <SPAN class=kwd>Dim</SPAN> m <SPAN class=kwd>As</SPAN> FarPoint.Win.Spread.Model.DefaultSheetDataModel = ss.ActiveSheet.Models.Data
    ss.Open(<SPAN class=st>"test.xml"</SPAN>)
    ss.ActiveSheet.Models.Data = m
    <SPAN class=kwd>End Sub</SPAN>
    </PRE> 
Need extra support?

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

Learn More

Forum Channels