1 – 3 of 3
Blogger Unknown said...

Yakko,

Thanks for the code - it helped TREMENDOUSLY! I'm using the grid non-bound.

I made a minor change to mine:
public class CalendarColumnNullable : DataGridViewColumn
{
public CalendarColumnNullable()
: base(new CalendarCellNullable())
...
}

public class CalendarCellNullable : CalendarCell
{
public CalendarCellNullable()
{
this.isNullable = true;
}
}

01 February, 2010 09:16

Blogger Mark Cranness said...

I had to also override CalenderCellNullable.Clone to get this to work (on .NET 2.0).

public override object Clone() {
CalenderCellNullable clone = (CalenderCellNullable)base.Clone();
clone.isNullable = this.isNullable;
return clone;
}

What am I missing in the original that made it work for you without the code above?

24 October, 2010 02:08

Blogger Yakko Warner said...

Good call, I didn't think about Clone.

I'm not sure why it would work for me without and it wouldn't work for you. All I could guess was that something in your implementation ended up using Clone, but mine did not. What that "something" is, though, I couldn't begin to guess.

24 October, 2010 14:59

Your civil comments are appreciated. Thanks!
You can use some HTML tags, such as <b>, <i>, <a>

This blog does not allow anonymous comments.

Comment moderation has been enabled. All comments must be approved by the blog author.

You will be asked to sign in after submitting your comment.
Please prove you're not a robot