Using data or Flexgrids and changing Datasource at runtime


DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 3 of 3

Thread: Using data or Flexgrids and changing Datasource at runtime

  1. #1
    ron tyndall Guest

    Using data or Flexgrids and changing Datasource at runtime


    Hi All,

    I am trying to learn ADO and using Data or Flexgrids in a program. I want
    to have the ability to prompt the user for the userid/password and server
    name when the program runs. It seems that a data/flex grids requires setting
    the Datasource at design time and not run time. Is that true? Is there a
    way to do what I want? Please help. A grid is the best way to display the
    data for my application but I do not want to create multiple versions of
    an application that connects to only one database.

    Thanks in advance for any help.
    Ron Tyndall

  2. #2
    Brent Guest

    Re: Using data or Flexgrids and changing Datasource at runtime


    "ron tyndall" <tyndall@nortelnetworks.com> wrote:
    >
    >Hi All,
    >
    >I am trying to learn ADO and using Data or Flexgrids in a
    >program. I want to have the ability to prompt the user for the
    >userid/password and server name when the program runs. It seems
    >that a data/flex grids requires setting the Datasource at
    >design time and not run time. Is that true? Is there a way to
    >do what I want? Please help. A grid is the best way to display
    >the data for my application but I do not want to create
    >multiple versions of an application that connects to only one
    >database.
    >
    >Thanks in advance for any help.
    >Ron Tyndall


    Ron,
    If what I garner here is correct you are not binding your grids to DataControls?
    If this is the case then you can not use the DataSource property as your
    grids are now, what is referred to as, UnBound.

    If you are using DataControls to bind your Grids to then you need to work
    with the DataControl's properties, not the Grids'.

    I would, however, recommend upgrading your Grid controls to the Full Featured
    equivalents. I know from first-hand experience that APEX Software's True
    DBGrid is much more developer friendly than the dorky MSDataGrid included
    with VB.

    HTH,
    Brent


  3. #3
    Andrew Grillage Guest

    Re: Using data or Flexgrids and changing Datasource at runtime

    Have a look at my sample at http://www.concresco.com/grids.htm
    You can prompt the user for username and password and then dynamically add
    them to your connection string at run time.

    --

    Andrew Grillage
    http://www.concresco.com


    ron tyndall <tyndall@nortelnetworks.com> wrote in message
    news:39197eed$1@news.devx.com...
    >
    > Hi All,
    >
    > I am trying to learn ADO and using Data or Flexgrids in a program. I want
    > to have the ability to prompt the user for the userid/password and server
    > name when the program runs. It seems that a data/flex grids requires

    setting
    > the Datasource at design time and not run time. Is that true? Is there a
    > way to do what I want? Please help. A grid is the best way to display the
    > data for my application but I do not want to create multiple versions of
    > an application that connects to only one database.
    >
    > Thanks in advance for any help.
    > Ron Tyndall




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