private void dataGridTextColumn3_DataCellFormatParamsNeeded(object sender, DataGridDataCellFormatParamsNeededEventArgs e)
 {
     if (e.Row == null)
     {
         return;
     }
     if (EhLibUtils.DBValueEqual(e.Column.GetRowValue(e.Row), "North America"))
     {
         e.CellArgs.Font = new Font(e.CellArgs.Font, FontStyle.Bold);
     }
 }
コード例 #2
0
        private void dataGridEh1_DataCellFormatParamsNeeded(object sender, DataGridDataCellFormatParamsNeededEventArgs e)
        {
            if (e.Column == null)
            {
                return;
            }
            int colNum = int.Parse(e.Column.Title.Text);

            if (e.Column.VisibleIndex == e.Row.VisibleIndex &&
                FindColRowDataByCol(colNum).RowNum == e.Row.VisibleIndex + 1)
            {
                e.CellArgs.BackColor = Color.OrangeRed;
            }
        }
        private void dataGrid1_DataCellFormatParamsNeeded(object sender, DataGridDataCellFormatParamsNeededEventArgs e)
        {
            if (e.Row == null)
            {
                return;
            }
            DataRowView rv = (DataRowView)e.Row.SourceItem;

            BiolifeDataSet.countryRow countryRow = (BiolifeDataSet.countryRow)rv.Row;
            if (!countryRow.IsContinentNull() && countryRow.Continent == "North America")
            {
                e.CellArgs.BackColor = Color.Bisque;
            }
        }
コード例 #4
0
        private void dataGridTextColumn4_DataCellFormatParamsNeeded(object sender, DataGridDataCellFormatParamsNeededEventArgs e)
        {
            if (e.Row == null)
            {
                return;
            }
            FileSystemFolterTreeNode node = (FileSystemFolterTreeNode)e.Row.SourceItem;

            if (node.Size == "?")
            {
                e.CellArgs.HorzAlign = HorizontalAlignment.Center;
            }
            else
            {
                e.CellArgs.HorzAlign = HorizontalAlignment.Right;
            }
        }