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
widy gui
NA
8
2.6k
How to input data in multi row into datagridview
Jun 9 2014 11:56 AM
Hi Everyone.
I got a problem when I want to input data into my second row. whenever i try to insert data,the data always appeared in the row.
here's my code...
private void btnTambahStock_Click(object sender, EventArgs e)
{
int i = 0, j = 0, k = 0, l = 1;
if (dataGridView1[i, j].Value != "")
{
j++;
}
if (txtKodeBukuStock.Text != "" && txtJudulBukuStock.Text != "" && txtPengarangStock.Text != ""
&& txtPenerbitStock.Text != "" && txtTahunTerbitStock.Text != "" && txtJlhBukuStock.Text != "")
{
dataGridView1[k, j ].Value = txtKodeBukuStock.Text;
dataGridView1[k = k + l, j ].Value = txtJudulBukuStock.Text;
dataGridView1[k = k + l, j ].Value = txtPengarangStock.Text;
dataGridView1[k = k + l, j ].Value = txtPenerbitStock.Text;
dataGridView1[k = k + l, j ].Value = txtTahunTerbitStock.Text;
dataGridView1[k = k + l, j ].Value = txtJlhBukuStock.Text;
}
else
{
//menampilkan messageBox
MessageBox.Show("Isi textBox terlebih dahulu", "Error");
}
}
I would like to get any idea about this.. thanks
Reply
Answers (
2
)
Getting Started with WPF C# and Database
Hi I need free downloadable a latest dump for 70-511