コード例 #1
0
    protected void Grid1_RowDataBound(object sender, Obout.Grid.GridRowEventArgs e)
    {
        if (e.Row.RowType == Obout.Grid.GridRowType.DataRow)
        {
            #region color stuff
            Hashtable hash = e.Row.ToHashtable();

            if (hash["txtypecolor"].ToString().Length == 6)
            {
                Color c = (Color)System.Drawing.ColorTranslator.FromHtml(@"#" + hash["txtypecolor"].ToString());
                //for (int i = 1; i < e.Row.Cells.Count; i++)
                for (int i = 1; i < 4; i++)
                {
                    if (i == 3)
                    {
                        e.Row.Cells[i].BackColor = c;
                    }
                    else
                    {
                        e.Row.Cells[i].BackColor = utilCharts.LightenColor(c, .4);
                    }
                }

                //e.Row.BackColor = (Color)System.Drawing.ColorTranslator.FromHtml(@"#" + hexcolor);
            }
            #endregion
        }
    }
コード例 #2
0
 protected void gvContacts_RowCreated(object sender, Obout.Grid.GridRowEventArgs e)
 {
     if ((e.Row.RowType == GridRowType.Header))
     {
         //e.Row.Cells[12].ToolTip = "You Are Bounded by (Cold,Warm,Hot)";
         //e.Row.Cells[13].ToolTip = "You Are Bounded by (Low,Medium,High)";
         //e.Row.Cells[14].ToolTip = "You Are Bounded by (NI,BL,WN,P)";
         //e.Row.Cells[15].ToolTip = "You Are Bounded by (C,M,IP,CL,CB)";
     }
 }
コード例 #3
0
    protected void GridTxAll_RowDataBound(object sender, Obout.Grid.GridRowEventArgs e)
    {
        if (e.Row.RowType == Obout.Grid.GridRowType.DataRow)
        {
            #region color stuff
            Hashtable hash = e.Row.ToHashtable();

            if (hash["txallcolor"].ToString().Length == 6)
            {
                Color call = (Color)System.Drawing.ColorTranslator.FromHtml(@"#" + hash["txallcolor"].ToString());

                e.Row.Cells[2].BackColor = call;
            }
            #endregion
        }
    }
コード例 #4
0
    protected void GridTxCat_RowDataBound(object sender, Obout.Grid.GridRowEventArgs e)
    {
        if (e.Row.RowType == Obout.Grid.GridRowType.DataRow)
        {
            #region color stuff
            Hashtable hash = e.Row.ToHashtable();

            if (hash["txcatcolor"].ToString().Length == 6)
            {
                Color c    = (Color)System.Drawing.ColorTranslator.FromHtml(@"#" + hash["txcatcolor"].ToString());
                Color call = (Color)System.Drawing.ColorTranslator.FromHtml(@"#" + hash["txallcolor"].ToString());
                //for (int i = 1; i < e.Row.Cells.Count; i++)

                e.Row.Cells[2].BackColor = utilCharts.LightenColor(c, .4);
                e.Row.Cells[3].BackColor = utilCharts.LightenColor(c, .4);
                e.Row.Cells[4].BackColor = c;

                e.Row.Cells[6].BackColor = call;
            }
            #endregion
        }
    }