ArgusTV.Recorder.MediaPortalTvServer.SetupForm._channelsDataGridView_CellFormatting C# (CSharp) Method

_channelsDataGridView_CellFormatting() private method

private _channelsDataGridView_CellFormatting ( object sender, System.Windows.Forms.DataGridViewCellFormattingEventArgs e ) : void
sender object
e System.Windows.Forms.DataGridViewCellFormattingEventArgs
return void
        private void _channelsDataGridView_CellFormatting(object sender, DataGridViewCellFormattingEventArgs e)
        {
            if (e.ColumnIndex == 1
                && e.RowIndex >= 0
                && e.RowIndex < _channelItemsBindingSource.Count)
            {
                LinkedChannelItem linkItem = _channelsDataGridView.Rows[e.RowIndex].DataBoundItem as LinkedChannelItem;
                if (linkItem != null)
                {
                    e.CellStyle.ForeColor = linkItem.RowColor;
                    e.CellStyle.SelectionForeColor = linkItem.RowColor;
                }
            }
        }