//
-#if NET_2_0
-
using System;
using System.ComponentModel;
private Type valueType;
private bool visible = true;
private int width = 100;
+ private int dataColumnIndex;
private bool headerTextSet = false;
headerCell.SetColumnIndex(Index);
headerCell.Value = string.Empty;
displayIndex = -1;
+ dataColumnIndex = -1;
dataPropertyName = string.Empty;
fillWeight = 100.0F;
sortMode = DataGridViewColumnSortMode.NotSortable;
}
}
+ internal int DisplayIndexInternal {
+ get { return DisplayIndex; }
+ set { displayIndex = value; }
+ }
+
+ internal int DataColumnIndex {
+ get { return dataColumnIndex; }
+ set {
+ dataColumnIndex = value;
+ if (dataColumnIndex >= 0)
+ isDataBound = true;
+ }
+ }
+
[DefaultValue (0)]
public int DividerWidth {
get { return dividerWidth; }
*/
}
+ [MonoTODO("Actually calculate width")]
public virtual int GetPreferredWidth (DataGridViewAutoSizeColumnMode autoSizeColumnMode, bool fixedHeight) {
switch (autoSizeColumnMode) {
case DataGridViewAutoSizeColumnMode.NotSet:
throw new ArgumentException("AutoSizeColumnMode is invalid");
}
if (fixedHeight) {
- return 0;
+ return MinimumWidth;
}
else {
- return 0;
+ return MinimumWidth;
}
}
headerCell.SetColumnIndex(Index);
}
- internal void SetIsDataBound (bool value)
- {
- isDataBound = value;
- }
-
internal override void SetState (DataGridViewElementStates state) {
if (State != state) {
base.SetState(state);
}
}
-#endif