Direct input into DataGrid?

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • RV

    #1

    Direct input into DataGrid?

    Hello

    I have used the Microsoft FlexGrid Control in VB6 to directly accept
    user input & display the same in its cells. For example, a user could
    click a cell to enter info which would be subsequently displayed in
    that cell.

    Is there a way to directly enter info into the DataGrid Control in
    Visual Basic .NET the same way? I do not want to connect to any
    database / table.

    Thanks in advance :-)

  • Steven Nagy

    #2
    Re: Direct input into DataGrid?

    You sure can.

    But you still need a DataTable.

    So try this:
    Create a new data table and specify its columns (Columns collection
    takes DataColumn objects).
    Then bind that data table to your grid.
    When the user enters new rows of information, those rows are in your
    datatable.Rows collection.

    A few notes: Datagrid will need to be editable. The datatable that you
    create has a DefaultView property which allows you to set whether the
    user can add rows, delete rows, and edit existing rows.

    Hope this helps buddy!

    Comment

    • Cor Ligthert [MVP]

      #3
      Re: Direct input into DataGrid?

      RV,

      It is as Steve tells, our website is full as created samples to do that.



      Here is one, we have no samples which does not something extras so simple is
      it in fact.

      I hope this helps,

      Cor


      "RV" <rajyav@hotmail .com> schreef in bericht
      news:1142218085 .153738.108910@ j52g2000cwj.goo glegroups.com.. .[color=blue]
      > Hello
      >
      > I have used the Microsoft FlexGrid Control in VB6 to directly accept
      > user input & display the same in its cells. For example, a user could
      > click a cell to enter info which would be subsequently displayed in
      > that cell.
      >
      > Is there a way to directly enter info into the DataGrid Control in
      > Visual Basic .NET the same way? I do not want to connect to any
      > database / table.
      >
      > Thanks in advance :-)
      >[/color]


      Comment

      • RV

        #4
        Re: Direct input into DataGrid?

        Thanks many tons, Steve and Cor :-)

        Will be trying this out and posting back.

        Regards

        RV

        Comment

        Working...