Best way to proceed

J

Jeff User

Hello all
I need to build a web form that will allow user to enter database
table column definitions. Each row on the form would contain column
name, data type (chosen from a drop down list), size (if applicable)
and other wonderful attributes. I will then take this input and build
a CREATE table statement.

I am using C# in vs2003, .net 1.1

I have been reading through several groups here to get ideas, but
really dont know what would be best.

One idea is to use a datagrid, that would initially have one empty row
with blanks or drop down lists as needed in each field (of grid). User
would fill in each field in grid then start a new (dynamically added)
row in the grid.

or another idea is
present 1 textbox, dropdownlist,etc as needed for describing one table
column and then when finished filling those in, generate an HTML table
display showing the new row of information that was just added
(representing 1 table column), while displaying new empty text
boxes,etc again to begin creating the next column definition.

Should be able to have a check box or delte button on each row to
delete an entry if desired.
Of course I want it to do everything but not be complicated ;o)

Any ideas, input, links, (already written code :eek:) )
is appreciated.
Jeff
 
G

garethdjames

I would use a datagrid and an in memory collection of custom objects
(that have col name, data type, size etc properties).

Then bind the in memory collection on each post back, doing this allows
you to use the add, delete, edit command of the datagrid, of course you
still have to write the logic

Using the datagrid gives you a structured way of presenting, adding,
deleting and editing the data, you don't need to think about this your
self then

I'm guessing this is for an intranet so I won't go on about security
issues of this
 

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

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,482
Members
44,901
Latest member
Noble71S45

Latest Threads

Top