1 // Permission is hereby granted, free of charge, to any person obtaining
2 // a copy of this software and associated documentation files (the
3 // "Software"), to deal in the Software without restriction, including
4 // without limitation the rights to use, copy, modify, merge, publish,
5 // distribute, sublicense, and/or sell copies of the Software, and to
6 // permit persons to whom the Software is furnished to do so, subject to
7 // the following conditions:
9 // The above copyright notice and this permission notice shall be
10 // included in all copies or substantial portions of the Software.
12 // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
13 // EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
14 // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
15 // NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
16 // LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
17 // OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
18 // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
20 // Copyright (c) 2004 Novell, Inc. (http://www.novell.com)
23 // Peter Bartok (pbartok@novell.com)
27 // NOT COMPLETE - Empty, has wrong signature (and is partially stubbed for dependend assemblies) until DataGrid is implemented
29 using System.ComponentModel;
32 namespace System.Windows.Forms {
33 public class DataGrid : Control {
34 #region Local Variables
35 internal bool allow_sorting;
36 internal bool caption_visible;
37 internal string data_member;
38 internal object data_source;
39 internal Color header_forecolor;
40 internal GridTableStylesCollection table_styles;
41 #endregion // Local Variables
43 #region Public Constructors
46 allow_sorting = false;
47 caption_visible = true;
48 data_member = string.Empty;
49 header_forecolor = Color.Black;
50 table_styles = new GridTableStylesCollection();
52 #endregion // Public Constructors
54 #region Public Instance Properties
55 public bool AllowSorting {
61 if (allow_sorting != value) {
62 allow_sorting = value;
67 public bool CaptionVisible {
69 return caption_visible;
73 if (caption_visible != value) {
74 caption_visible = value;
76 OnCaptionVisibleChanged(EventArgs.Empty);
81 public string DataMember {
87 if (data_member != value) {
93 public object DataSource {
99 if (data_source != value) {
102 OnDataSourceChanged(EventArgs.Empty);
107 public Color HeaderForeColor {
109 return header_forecolor;
113 if (header_forecolor != value) {
114 header_forecolor = value;
119 public GridTableStylesCollection TableStyles {
124 #endregion // Public Instance Properties
126 #region Protected Instance Properties
127 #endregion // Protected Instance Properties
129 #region Public Instance Methods
131 public void Expand(int Row) {
132 throw new NotImplementedException();
134 #endregion // Public Instance Methods
136 #region Protected Instance Methods
137 protected virtual void OnCaptionVisibleChanged(EventArgs e) {
138 if (CaptionVisibleChanged != null) {
139 CaptionVisibleChanged(this, e);
143 protected virtual void OnDataSourceChanged(EventArgs e) {
144 if (DataSourceChanged != null) {
145 DataSourceChanged(this, e);
148 #endregion // Protected Instance Methods
151 public event EventHandler CaptionVisibleChanged;
152 public event EventHandler DataSourceChanged;