DataGrid - Enter data in a cell at run time


DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 2 of 2

Thread: DataGrid - Enter data in a cell at run time

Hybrid View

  1. #1
    William Gaddam Guest

    DataGrid - Enter data in a cell at run time


    Hi guys!

    I am stuck with this problem of entering data into a data grid.

    I have a data grid bound to an ADO data control. The data control in in
    AddNew mode and the data grid is alo in AddNew mode. In AddNewMode condition
    I want to do tha followoing:

    Before the user enter data into the first row of the data grind, I want to
    populate thre columns with default data from the form and then let the user
    enter the rest of the data.

    How would I set the values of the columns at run time? The following statement
    does not work. It does not display any error message. But the data is not
    shown in the row of the grid.

    If dgrRules.AddNewMode = dbgAddNewPending then
    dgrRules.Columns("CarrierCircuitID").Text = txtCircuitID.Text
    end if

    Where dgrRules is a DataGrid
    txtCircuitID.Text is a text control on the form

    Thanks for your help!

    Bill

  2. #2
    William Gaddam Guest

    Re: DataGrid - Enter data in a cell at run time


    "William Gaddam" <williamg@bytes-intl.com> wrote:
    >
    >Hi guys!
    >
    >I am stuck with this problem of entering data into a data grid.
    >
    >I have a data grid bound to an ADO data control. The data control in in
    >AddNew mode and the data grid is alo in AddNew mode. In AddNewMode condition
    >I want to do tha followoing:
    >
    >Before the user enter data into the first row of the data grind, I want

    to
    >populate thre columns with default data from the form and then let the user
    >enter the rest of the data.
    >
    >How would I set the values of the columns at run time? The following statement
    >does not work. It does not display any error message. But the data is

    not
    >shown in the row of the grid.
    >
    >If dgrRules.AddNewMode = dbgAddNewPending then
    > dgrRules.Columns("CarrierCircuitID").Text = txtCircuitID.Text
    >end if
    >
    >Where dgrRules is a DataGrid
    > txtCircuitID.Text is a text control on the form
    >
    >Thanks for your help!
    >
    >Bill



    I have found the answer.

    Thanks,

    Bill

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