This is a migrated thread and some comments may be shown as answers.

[Solved] Export RadDocument TabelCell style

1 Answer 85 Views
GridView
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Guo Bin
Top achievements
Rank 1
Guo Bin asked on 24 Aug 2011, 07:12 AM

HI,
    now i have working on GridView Export, and some cell i want set different style, i have look into the styledefinition, but it was not function, you can refer to my code below. Thanks

private void AddCellValue(TableCell cell, string value)
        {
            Paragraph paragraph = new Paragraph();
            cell.Blocks.Add(paragraph);
  
            Span span = new Span();
            span.Text = value;
            if (isDateTime(value))
            {
                Telerik.Windows.Documents.Model.Styles.StyleDefinition styleInfo = new Telerik.Windows.Documents.Model.Styles.StyleDefinition();
                styleInfo.SetPropertyValue(new ExcelDateTimeStyle(), "yyyy\\-mm\\-dd\\ HH:mm:ss");
  
                cell.Style = styleInfo;
             }
            paragraph.Inlines.Add(span);           
        }

1 Answer, 1 is accepted

Sort by
0
Guo Bin
Top achievements
Rank 1
answered on 24 Aug 2011, 08:27 AM
anybody can help?
Tags
GridView
Asked by
Guo Bin
Top achievements
Rank 1
Answers by
Guo Bin
Top achievements
Rank 1
Share this question
or