public PxFootnote CreateMainTableFootnote(PxObject context) { PxMainTableFootnote f = new PxMainTableFootnote(); f.FootnoteNo = FootnoteNo; FootnoteNo++; f.FootnoteText = "Shenim i ri"; f.FootnoteTextEnglish = "New Footnote"; f.MandOption = "O"; f.ShowFootnote = "B"; f.IsNew = true; _table.Footnotes.Add(f); _table.MarkAsDirty(); return(f); }
private void btnAddMainTableFootnote_Click(object sender, EventArgs e) { FootnoteDialog frmFootnote = new FootnoteDialog(); frmFootnote.Context = _table; if (_table.Footnotes.Count == 0) { PxMainTableFootnote f = (PxMainTableFootnote)CreateMainTableFootnote(frmFootnote.Context); } frmFootnote.SetDataSource((PxFootnote[])_table.Footnotes.ToArray()); frmFootnote.AddFotnoteHandler = CreateMainTableFootnote; frmFootnote.RemoveFootnoteHandler = RemoveMainTableFootnote; frmFootnote.ShowDialog(); }