예제 #1
0
 /// <summary>
 /// Assign data cell style to all table cell (use Devexpress css theme)
 /// </summary>
 /// <param name="table">table</param>
 /// <param name="postfix">postfix get from current used theme</param>
 /// <remarks></remarks>
 public static void SetAllDataCell(this HtmlTable table, string postfix)
 {
     table.SetTableStyle(postfix);
     for (int i = 0; i < table.Rows.Count; i++)
     {
         table.Rows[i].SetRowStyle(postfix);
         for (int j = 0; j < table.Rows[i].Cells.Count; j++)
         {
             table.Rows[i].Cells[j].SetDataCellStyle();
         }
     }
 }
예제 #2
0
    private void SetThemeTable(ref HtmlTable table)
    {
        string cssPostfix = gdvPartyAttribute.CssPostfix;

        table.SetTableStyle(cssPostfix);
        for (int i = 0; i < table.Rows.Count; i++)
        {
            table.Rows[i].Cells[0].SetHeaderCellStyle(cssPostfix);
            for (int j = 1; j < table.Rows[i].Cells.Count; j++)
            {
                table.Rows[i].Cells[j].SetDataCellStyle();
            }
            table.Rows[i].SetRowStyle(cssPostfix);
        }
    }
예제 #3
0
 public static void SetCssHtmlTable_V(this HtmlTable tableContent, string postfix)
 {
     tableContent.SetTableStyle(postfix);
     for (int i = 0; i < tableContent.Rows.Count; i++)
     {
         tableContent.Rows[i].SetRowStyle(postfix);
         for (int j = 0; j < tableContent.Rows[i].Cells.Count; j++)
         {
             if (j == 0)
             {
                 tableContent.Rows[i].Cells[j].SetHeaderCellStyle(postfix);
             }
             else
             {
                 tableContent.Rows[i].Cells[j].SetDataCellStyle();
             }
         }
     }
 }
예제 #4
0
 public static void SetCssHtmlTable_H(this HtmlTable tableContent, string postfix, bool datacellOnly)
 {
     tableContent.SetTableStyle(postfix);
     for (int i = 0; i < tableContent.Rows.Count; i++)
     {
         tableContent.Rows[i].SetRowStyle(postfix);
         for (int j = 0; j < tableContent.Rows[i].Cells.Count; j++)
         {
             if (i == 0 && datacellOnly == false)
             {
                 tableContent.Rows[i].Cells[j].SetHeaderCellStyle(postfix);
             }
             else
             {
                 tableContent.Rows[i].Cells[j].SetDataCellStyle();
             }
         }
     }
 }