?
Solved

create datatable programmatically

Posted on 2008-11-10
1
Medium Priority
?
717 Views
Last Modified: 2012-05-05
I am tyring to create the dataentry form similar to the screen shot below. So on the page load i would have
bunch of text boxes and dropdowns, and upon submitting the form it suppose to save all that information in system.
What is the best approach to achieve that? I can create the form lookup with ASP:Table, but i am not sure
how can i save information from table to system. So creating dynamic table is the way to go, or there is some other
better approch that i can use. Thanks a lot in advance for your help.
screen.bmp
0
Comment
Question by:GWebHMP
1 Comment
 
LVL 4

Accepted Solution

by:
lotusnotesnewbie earned 1500 total points
ID: 22928513
I am not sure about the best approach but this is how you can create a data table,

DataRow objDR;
DataTable objDT = new DataTable("RVI");
objDT.Columns.Add(new DataColumn("ProductID", typeof(Int32)));
objDT.Columns.Add(new DataColumn("Name", typeof(String)));

//Each time you create a new row
 objDR = objDT.NewRow();
 objDR["ProductID"] = Textbox1.Text;
objDR["Name"] = Textbox2.Text;
objDR["Designer"] = ddcountry.SelectedValue;
0

Featured Post

Vote for the Most Valuable Expert

It’s time to recognize experts that go above and beyond with helpful solutions and engagement on site. Choose from the top experts in the Hall of Fame or on the right rail of your favorite topic page. Look for the blue “Nominate” button on their profile to vote.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

One of the pain points with developing AJAX, JavaScript, JQuery, and other client-side behaviors is that JavaScript doesn’t allow for cross domain request for pulling content. For example, JavaScript code on www.johnchapman.name could not pull conte…
User art_snob (http://www.experts-exchange.com/M_6114203.html) encountered strange behavior of Android Web browser on his Mobile Web site. It took a while to find the true cause. It happens so, that the Android Web browser (at least up to OS ver. 2.…
This video shows how to quickly and easily deploy an email signature for all users in Office 365 and prevent it from being added to replies and forwards. (the resulting signature is applied on the server level in Exchange Online) The email signat…
As many of you are aware about Scanpst.exe utility which is owned by Microsoft itself to repair inaccessible or damaged PST files, but the question is do you really think Scanpst.exe is capable to repair all sorts of PST related corruption issues?
Suggested Courses
Course of the Month15 days, 3 hours left to enroll

840 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question