// ***********************************************************************
// Assembly : JinYuan.ControlLib
// Created : 08-09-2019
//
// ***********************************************************************
//
// Copyright by Huang Zhenghui(黄正辉) All, QQ group:568015492 QQ:623128629 Email:623128629@qq.com
//
//
// Blog: https://www.cnblogs.com/bfyx
// GitHub:https://github.com/kwwwvagaa/NetWinformControl
// gitee:https://gitee.com/kwwwvagaa/net_winform_custom_control.git
//
// If you use this code, please keep this note.
// ***********************************************************************
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows.Forms;
namespace JinYuan.ControlLib
{
///
/// Interface IDataGridViewRow
///
public interface IDataGridViewRow
{
///
/// Occurs when [row custom event].
///
event DataGridViewRowCustomEventHandler RowCustomEvent;
///
/// CheckBox选中事件
///
event DataGridViewEventHandler CheckBoxChangeEvent;
///
/// 点击单元格事件
///
event DataGridViewEventHandler CellClick;
///
/// 数据源改变事件
///
event DataGridViewEventHandler SourceChanged;
///
/// 列参数,用于创建列数和宽度
///
/// The columns.
List Columns { get; set; }
///
/// Gets or sets a value indicating whether this instance is show CheckBox.
///
/// true if this instance is show CheckBox; otherwise, false.
bool IsShowCheckBox { get; set; }
///
/// 是否选中
///
/// true if this instance is checked; otherwise, false.
bool IsChecked { get; set; }
///
/// 数据源
///
/// The data source.
object DataSource { get; set; }
///
/// 添加单元格元素,仅做添加控件操作,不做数据绑定,数据绑定使用BindingCells
///
void ReloadCells();
///
/// 绑定数据到Cell
///
/// 返回true则表示已处理过,否则将进行默认绑定(通常只针对有Text值的控件)
void BindingCellData();
///
/// 设置选中状态,通常为设置颜色即可
///
/// 是否选中
void SetSelect(bool blnSelected);
///
/// 行高
///
/// The height of the row.
int RowHeight { get; set; }
///
/// 行号
///
/// The Index of the row.
int RowIndex { get; set; }
}
}