Custom web control data binding

Discussion in 'ASP .Net Web Controls' started by Konstantin, Jun 28, 2004.

  1. Konstantin

    Konstantin Guest

    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

    --
    Konstantin

    PS. That's a pity, all the examples I have seen so far made with properties
    of type String. :-(
     
    Konstantin, Jun 28, 2004
    #1
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. =?Utf-8?B?SmF5YnVmZmV0?=
    Replies:
    9
    Views:
    865
    Phillip Williams
    Feb 21, 2006
  2. Matt Sokol
    Replies:
    2
    Views:
    434
    Theo Tillotson
    Aug 7, 2003
  3. Konstantin

    Custom web control data binding (Non-string properties)

    Konstantin, Jun 30, 2004, in forum: ASP .Net Building Controls
    Replies:
    0
    Views:
    147
    Konstantin
    Jun 30, 2004
  4. JcFx
    Replies:
    0
    Views:
    318
  5. vineetbatta

    Binding data to Grid control with CUSTOM DATA CLASS

    vineetbatta, Oct 16, 2006, in forum: ASP .Net Datagrid Control
    Replies:
    0
    Views:
    774
    vineetbatta
    Oct 16, 2006
Loading...

Share This Page