Author Topic: Result is not correct for RowTypes  (Read 7766 times)

0 Members and 1 Guest are viewing this topic.

Andrey Bushman

  • Swamp Rat
  • Posts: 864
Re: Result is not correct for RowTypes
« Reply #15 on: October 20, 2010, 04:13:19 AM »
did you try table.GetCellStyle(r,-1)?
For what?
That works as in your picture, albeit with blue squiggles, since it should be table.Cells.[r,-1].Style now.
I haven't understood you.

kaefer

  • Guest
Re: Result is not correct for RowTypes
« Reply #16 on: October 20, 2010, 04:50:35 AM »
did you try table.GetCellStyle(r,-1)?
For what?

To get the Row Style as formulated in your original question.

Sorry, it's only F#, but I like it:
Code: [Select]
    let peo = new PromptEntityOptions("Select table")
    let result = ed.GetEntity peo
    if result.Status = PromptStatus.OK then
        use tr = doc.TransactionManager.StartTransaction()
        let table = tr.GetObject(result.ObjectId, OpenMode.ForWrite) :?> Table

        for r = 0 to table.NumRows - 1 do
            ed.WriteMessage("\nRow: {0} RowType: {1} ", r, table.GetCellStyle(r,-1))

        tr.Commit()
Cheers, Thorsten

Andrey Bushman

  • Swamp Rat
  • Posts: 864
Re: Result is not correct for RowTypes
« Reply #17 on: October 20, 2010, 05:02:33 AM »
To get the Row Style as formulated in your original question.
Code: [Select]
table.GetCellStyle(r,[color=red]-1[/color])?

Yes, it that is necessary for me. Thank you very much!   :-)

bikelink

  • Guest
Re: Result is not correct for RowTypes
« Reply #18 on: December 16, 2010, 03:50:49 PM »
Hi guys.. another question about style..


In a table with a style standard..the title don't looks right.
Why the cells in the title are separated ? the style standard in Header section is different.
Thanks in advance for any idea.







            Database db = doc.Database;
            Table tb = new Table();
            tb.TableStyle = db.Tablestyle;
            tb.NumColumns = lst.Count;
            PrintCellStylesInfo(doc,db.Tablestyle);
            
            tb.NumRows = tabella.Rows.Count + 2;
            // tb.NumColumns = this.TbDistintaManufatto.Columns.Count;
          
            tb.SetRowHeight(5);
            tb.SetColumnWidth(15);