K
Konstantin
Hi!
I have a strange problem with custom control data binding.
I have created a new web control that has a couple of properties of type
Decimal. Everything works fine if I bind these properties to something of
type Decimal, but if I try to bind them to, say Int or Short, I get
"Specified cast not invalid" exception.
That is a bit funny, this web control is read-only, i.e. it does not trying
to modify anything. Both, int and short types can be converted to decimal. I
even tried to attach a standard type converter and my own type converter to
these properties. No luck.
Any help would be really appreciated.
BTW, I tried to change these properties to be int, short, single etc. The
same problem.
Thanks in advance
I have a strange problem with custom control data binding.
I have created a new web control that has a couple of properties of type
Decimal. Everything works fine if I bind these properties to something of
type Decimal, but if I try to bind them to, say Int or Short, I get
"Specified cast not invalid" exception.
That is a bit funny, this web control is read-only, i.e. it does not trying
to modify anything. Both, int and short types can be converted to decimal. I
even tried to attach a standard type converter and my own type converter to
these properties. No luck.
Any help would be really appreciated.
BTW, I tried to change these properties to be int, short, single etc. The
same problem.
Thanks in advance