portgas d ace
portgas d ace

Reputation: 309

How to create this kind of Gridview is ASP.Net?

**Header: Hobbies**

Item1

Item2

Item3

**Hobbies: Textbox Field**

**Header: Skills**

Item1

Item2

Item3

**Skills: Textbox Field | Save Button**

How can I create this kind of Gridview in ASP.Net?

every group header, there is a field to display the item and textbox field where I can put the value of user's desired input and a button to save the record to the database.

Upvotes: 0

Views: 216

Answers (2)

Ratna
Ratna

Reputation: 2319

how your data is organised? if it is normalised then you must be having seperate tables for different headers linked by userid. if this is the case easiest way is to have nested gridview.Create a parent gridview with one column. convert that column into tempelate fiels, drop a table with 1 column and X rows(no. of header)in each row drop seperate gridview and bind them to the required userid.

Upvotes: 0

Kapil Khandelwal
Kapil Khandelwal

Reputation: 16144

Consider using ListView Web Server Control instead of GridView.

ListView: The ASP.NET ListView control enables you to bind to data items that are returned from a data source and display them. You can display data in pages. You can display items individually, or you can group them.

The ListView control displays data in a format that you define by using templates and styles. It is useful for data in any repeating structure, similar to the DataList and Repeater controls. However, unlike those controls, with the ListView control you can enable users to edit, insert, and delete data, and to sort and page data, all without code.

Upvotes: 1

Related Questions