I have a question regarding a data binding(of multiple properties) for custom DataGridViewColumn. Here is a schema of what controls that I have, and I need to make it bindable with DataGridView datasource. Any ideas or a link to an article discussing the matter?
控制
- Graph Control(custom): Displayed in the custrom DataGridView column. Has properties like "Start Date", "EndDate", Windows Chart control, which is itself, bindable, etc.
- Custom cell(DataGridViewCustomCell inherits from DataGridViewCell) that holds the Graph control and processes some events(OnEnter event, for example, passes the focus to the custom Graph column for drag-n-drop type of events, etc.)
- Custom column(DataGridViewCustomColumn inherits from DataGridViewColumn) that defined the cell template type: CellTemplate = new DataGridViewCustomCell(); and also a primary choice for data binding
数据结构:
- Main table to be displayed in other DataGridView Columns
- Graph table - related to the Main table via parent-child relationship. Holds graph data
- Chart table related to the graph table via parent-child relationship. Holds data for the win-form chart, which is a part of my Graph control.
直到目前为止,我甚至不能将Graph表中的数据绑定到我的Graph控件或Graph-holding列/单元格。