1

I'm working on asp.net framework 4
I'm looking for a good example of the following case:

I have formview as master data it contains person data:

  • person_data_id
  • person_name
  • age
  • ......

The formview contains a datagrid as details data which are family members:

  • family_member_id
  • person_data_id
  • name
  • .......

I need to save the detail data to "DataTable"

Page has one insert button, inserts both master and detail data to the sql server database. I'm using linq to get data

I don't know how to create this relation in the page between formview and datagrid or how to save data to the database at once.

Blachshma
  • 17,097
  • 4
  • 58
  • 72
Abady
  • 111
  • 1
  • 2
  • 10

2 Answers2

0

There are plenty tutorials about, I suggest the asp.net site, here is the data-access point

http://www.asp.net/web-forms/tutorials/data-access

a similar answer: Which is the recommended way to fill all controls on a Web Form when user selects a record?

Community
  • 1
  • 1
Aristos
  • 66,005
  • 16
  • 114
  • 150
0

I solved my own question, for everyone need the solution Using RadGrid I bound the details DataTable using NeedDataSource event, fill DataTable from Db and set as datagrid datasource

In InsertCommand: read values from datagrid and insert new Row to DataTable

Abady
  • 111
  • 1
  • 2
  • 10