CheckBox within DataGrid (Oracle DB)


DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 3 of 3

Thread: CheckBox within DataGrid (Oracle DB)

  1. #1
    Neil C Guest

    CheckBox within DataGrid (Oracle DB)


    Hi

    I have bound a datagrid to an ADO recordset at runtime. The database I am
    using is Oracle 7.3 and I'm using the MSDAORA OLE DB provider. I am trying
    to display a check box in one of the columns however this doesn't seem to
    work because their is no BOOLEAN datatype in Oracle. The database field I
    am binding this column to is a NUMBER(1) populated with either 0 or -1. When
    I run my app no checkbox is displayed just the number 0 or 1. The strange
    thing is if I format this column from the Format tab on the Datagrid Property
    Page as Boolean rather than Checkbox it correctly displays "True" or "False"!!!

    Has anyone got any suggestions????

    Thanks

    Neil

  2. #2
    Brent Guest

    Re: CheckBox within DataGrid (Oracle DB)


    Neil,
    The DBGrid that ships with VB does not support this. You will need to upgrade
    to APEX Software's True DBGrid Pro 6.0.

    Once you have obtained the control you will use a ValueItems Collection for
    the Column to Translate the Value from your value to the corresponding CheckBox
    (they have a detailed example of how this is done and it is included with
    the product).

    Brent

    "Neil C" <neil.crooks@scottishpower.plc.uk> wrote:
    >
    >Hi
    >
    >I have bound a datagrid to an ADO recordset at runtime. The database I am
    >using is Oracle 7.3 and I'm using the MSDAORA OLE DB provider. I am trying
    >to display a check box in one of the columns however this doesn't seem to
    >work because their is no BOOLEAN datatype in Oracle. The database field

    I
    >am binding this column to is a NUMBER(1) populated with either 0 or -1.

    When
    >I run my app no checkbox is displayed just the number 0 or 1. The strange
    >thing is if I format this column from the Format tab on the Datagrid Property
    >Page as Boolean rather than Checkbox it correctly displays "True" or "False"!!!
    >
    >Has anyone got any suggestions????
    >
    >Thanks
    >
    >Neil



  3. #3
    Derek Guest

    Re: CheckBox within DataGrid (Oracle DB)


    Neil, the only reason you're getting "True" or "False" in the grid is VBs
    interpretation of 0 (False) and -1 (True). I encountered something similar
    when I upsized an Access database to SQL Server. I'm not 100% sure, but
    think you may just have to live with it.

    "Neil C" <neil.crooks@scottishpower.plc.uk> wrote:
    >
    >Hi
    >
    >I have bound a datagrid to an ADO recordset at runtime. The database I am
    >using is Oracle 7.3 and I'm using the MSDAORA OLE DB provider. I am trying
    >to display a check box in one of the columns however this doesn't seem to
    >work because their is no BOOLEAN datatype in Oracle. The database field

    I
    >am binding this column to is a NUMBER(1) populated with either 0 or -1.

    When
    >I run my app no checkbox is displayed just the number 0 or 1. The strange
    >thing is if I format this column from the Format tab on the Datagrid Property
    >Page as Boolean rather than Checkbox it correctly displays "True" or "False"!!!
    >
    >Has anyone got any suggestions????
    >
    >Thanks
    >
    >Neil



Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center