3 Replies - 892 Views - Last Post: 04 March 2012 - 08:23 PM Rate Topic: -----

#1 rekha_kj  Icon User is offline

  • D.I.C Head

Reputation: 0
  • View blog
  • Posts: 56
  • Joined: 14-September 11

Editable or customized data grid in vb.net

Posted 01 March 2012 - 02:22 AM

Hi,
I am creating a windows application for my company. in the master file i will enter the number of items we are getting from the customer. and in the next page i have to enter the details of each item. For that i have created a datagrid which has one autogenerate number field and the remaining fields must be editable. So that when i enter all the values in the datagrid, it has to go and save in the data base.

Can any one suggest how to do that.

Thanks
Rekha

Is This A Good Question/Topic? 0
  • +

Replies To: Editable or customized data grid in vb.net

#2 nK0de  Icon User is offline

  • Catch me As Exception
  • member icon

Reputation: 205
  • View blog
  • Posts: 823
  • Joined: 21-December 11

Re: Editable or customized data grid in vb.net

Posted 01 March 2012 - 02:26 AM

you need to use ADO.NET in your program to work with a database. Here's an article explaining the basics of ADO.NET. Search the tutorial section of DIC too. I'm sure you'll find a lot of useful resources.

This post has been edited by nK0de: 01 March 2012 - 02:27 AM

Was This Post Helpful? 0
  • +
  • -

#3 CharlieMay  Icon User is offline

  • This space intentionally left blank
  • member icon

Reputation: 1605
  • View blog
  • Posts: 5,162
  • Joined: 25-September 09

Re: Editable or customized data grid in vb.net

Posted 01 March 2012 - 05:33 AM

This can be done rather quickly using an executeNonQuery method and let the database handle the automatic number generation.

You could also do it with a dataset object bound to the dgv and then updated back to the database

I'm assuming since you're doing this for a company, you already have the knowledge of manipulating a database? Is my assumption correct?
Was This Post Helpful? 0
  • +
  • -

#4 rekha_kj  Icon User is offline

  • D.I.C Head

Reputation: 0
  • View blog
  • Posts: 56
  • Joined: 14-September 11

Re: Editable or customized data grid in vb.net

Posted 04 March 2012 - 08:23 PM

Hi,
In Page1 which i have attached RMNNo will be generated automatically and it will ask the user to enter the number of items in Page2. So i next form, all the item details i want to enter. But i cant display the second screen multiple times, I decided to create a table at run time, the number of rows will change depending on the number of items entered by the user. But in the table we may have to get some of the values from the database and display as a combo box so that the user can select from the list. So i decided to use the editable data grid. Can anyone please suggest some idea how to do that. Any sample coding.

Thanks
Rekha

Attached image(s)

  • Attached Image
  • Attached Image

Was This Post Helpful? 0
  • +
  • -

Page 1 of 1