Custom web control data binding

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,995
Messages
2,570,225
Members
46,815
Latest member
treekmostly22

Latest Threads

Top