Hello, Can you please help me?

Is it posible to input data on a "DATAGRID" even if it is not connected to a database?
My Datasource Connection is not working because of some installation problems. I don't have the CD for installation that is why I couldn't re-install it.

How can I input data from the "TEXTBOX" above, straight to the "DATAGRID" using the Buttons "ITEMS" . What I want to do is when I click on the Items Buttons it will automatically go to the "TEXTBOX" then it will be automatically ** added on the "DATAGRID"**...
How will it be DONE?

Attachments Boom2.jpg 204.29 KB
4 Years
Discussion Span
Last Post by oussama_1

It is simple.
On button click do the following.

dataGridView1.Rows.Add (textBox1 .Text);

if you have multiple data then arrange it row wise in arguments.

dataGridView1.Rows.Add (textBox1 .Text,textbox2.text);

For more reference See Here


Thank you for quick responses!
Now I it works.
But the text joined at the same cell. What should I do.
I have come up with this code:

  1. Private Sub Button6_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button6.Click
  2. desiredWatermark.AppendText("Bag")
  3. DataGridView1.Rows.Add(Watermark1.Text + "Bag", Watermark1.Text + "8494839485", Watermark1.Text + "1234")
  4. End Sub
This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.