throw new NotImplementedException();
}
- protected override Rectangle GetErrorIconBounds (Graphics graphics, DataGridViewCellStyle cellStyle, int rowIndex) {
- throw new NotImplementedException();
+ protected override Rectangle GetErrorIconBounds (Graphics graphics, DataGridViewCellStyle cellStyle, int rowIndex)
+ {
+ if (DataGridView == null || string.IsNullOrEmpty (ErrorText))
+ return Rectangle.Empty;
+
+ Size error_icon = new Size (12, 11);
+ return new Rectangle (new Point (Size.Width - error_icon.Width - 23, (Size.Height - error_icon.Height) / 2), error_icon);
}
protected override object GetFormattedValue (object value, int rowIndex, ref DataGridViewCellStyle cellStyle, TypeConverter valueTypeConverter, TypeConverter formattedValueTypeConverter, DataGridViewDataErrorContexts context) {
return list.Contains(value);
}
- void ICollection.CopyTo (Array destination, int arrayIndex)
+ void ICollection.CopyTo (Array destination, int index)
{
- CopyTo ((object[])destination, arrayIndex);
+ CopyTo ((object[]) destination, index);
}
- public void CopyTo (object[] destination, int arrayIndex) {
- list.CopyTo(destination, arrayIndex);
+ public void CopyTo (object[] destination, int arrayIndex)
+ {
+ list.CopyTo (destination, arrayIndex);
}
public IEnumerator GetEnumerator () {
}
- int IList.Add (object value)
+ int IList.Add (object item)
{
- return Add (value);
+ return Add (item);
}
}