TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
roy himanshu
NA
126
0
can i add new column in table through gridview?
Sep 9 2009 4:04 AM
hi .all
can i add new column in data table through gridview when form load?is it possible? plz tell how is it possible .my code is paste bellow.
private
void
Form3_Load(
object
sender,
EventArgs
e)
{
cn =
new
SqlConnection
(
"data source=server2;database=costing1;user id=sa;password=sa"
);
da =
new
SqlDataAdapter
(
"select *from Itemmaster"
, cn);
DataTable
dt =
new
DataTable
();
dt.Columns.Add(
"column005"
,
typeof
(
int
));
ds =
new
DataSet
();
da.Fill(ds,
"Itemmaster"
);
cmd =
new
SqlCommand
();
cmd.Connection = cn;
cmd.CommandType =
CommandType
.StoredProcedure;
dataGridView1 .DataSource =ds .Tables [
"Itemmaster"
];
}
Reply
Answers (
1
)
how to create ms access backup and restore in c#
convert HTML table into PDF file using c#.net