dynamically creating a GridView with x rows based on database table column design

A

Andy B

I need to take an existing GridView that connects to a database and gets
rows from a table and force it to show x rows in the insert mode. This is
what should happen:

1. There is a TextBox in the GridView header where I type the number of rows
I want to show in insert mode. Say I type 12.
2. When I click Add, the GridView changes to insert mode showing the 12 rows
ready to be filled in. I would use a custom template for insert mode.
3. In the footer of the GridView, There are 2 buttons, insert and cancel.
Pressing insert inserts the 12 rows into the database table and returns the
user to read only mode with the updated list. pressing cancel just returns
the user to read only mode.

Any recommendations on how to create a GridView like this? I would rather
use linq for the data access if possible.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,982
Messages
2,570,186
Members
46,739
Latest member
Clint8040

Latest Threads

Top