Update data from textbox to Datagrid

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Bremen
    New Member
    • Oct 2006
    • 4

    Update data from textbox to Datagrid

    Hello, i am new here.

    I have a datacombo,comma nd button, a textbox and a gridview on my form.
    When a choose a data from datacombo, it will appear on the textbox.
    Mhy question is how can i add the data from the textbox that i choose to a gridview.
  • Killer42
    Recognized Expert Expert
    • Oct 2006
    • 8429

    #2
    Originally posted by Bremen
    Hello, i am new here.

    I have a datacombo,comma nd button, a textbox and a gridview on my form.
    When a choose a data from datacombo, it will appear on the textbox.
    Mhy question is how can i add the data from the textbox that i choose to a gridview.
    When you say "the data from the textbox that i choose" are you referring to choosing the textbox, or selecting part of the text within it? Either way should be pretty simple, but it depends on exactly what you're trying to do (please be specific) and what type of grid you are talking about. There are a number of them to choose from, including
    • Microsoft Data bound Grid Control
    • Microsoft DataGrid Control
    • Microsoft FlexGrid Control
    • Microsoft Grid Control
    • Microsoft Hierarchical FlexGrid Control
    • Probably any number of non-MS controls

    Comment

    • Bremen
      New Member
      • Oct 2006
      • 4

      #3
      "the data from the textbox that i choose" means, the data that appear at the textbox when i choose it from datacombo. Like selecting an item from datacombo and the item appears in textbox.

      I am using Microsoft DataGrid Control.

      Comment

      • Killer42
        Recognized Expert Expert
        • Oct 2006
        • 8429

        #4
        Originally posted by Bremen
        "the data from the textbox that i choose" means, the data that appear at the textbox when i choose it from datacombo. Like selecting an item from datacombo and the item appears in textbox.

        I am using Microsoft DataGrid Control.
        So, you mean that when you choose an item in the combo, you want it to appear in both the textbox and the DataGrid?

        Comment

        • Bremen
          New Member
          • Oct 2006
          • 4

          #5
          Originally posted by Killer42
          So, you mean that when you choose an item in the combo, you want it to appear in both the textbox and the DataGrid?
          I want the item to appear when i press the command button. By pressing the command button, the item will appear to DataGrid. Its like this in sequence:

          1- Choose item from combobox
          2- Item that i choose from combo box appear in textbox
          3- Press the command button
          4- Item appear in DataGrid.

          I have no idea how to code the command button or whatsoever so that the item will appear in DataGrid. Please help me.

          Comment

          • Killer42
            Recognized Expert Expert
            • Oct 2006
            • 8429

            #6
            Originally posted by Bremen
            ...
            1- Choose item from combobox
            2- Item that i choose from combo box appear in textbox
            3- Press the command button
            4- Item appear in DataGrid.
            ....
            Thanks, I think we've got the problem more clearly defined now.

            I can't really help any further with it though, as I don't know how to work with the datagrid. Had a quick look at the properties/methods, and couldn't make heads or tails of them. If it was a simple FlexGrid, that would be a different matter.

            Hopefully, someone else will jump in at this point with more relevant info.

            Comment

            • Bremen
              New Member
              • Oct 2006
              • 4

              #7
              Anyone can help me with this problem?

              Comment

              • Killer42
                Recognized Expert Expert
                • Oct 2006
                • 8429

                #8
                Originally posted by Bremen
                Anyone can help me with this problem?
                Does it need to be the datagrid? Is it connected to a data source?

                Comment

                Working...