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
Sakthis
NA
50
18.6k
How to set first next previous last in listview?
Oct 13 2013 9:32 AM
Hi,
I have a listview like:
private void Listview_Load(object sender, EventArgs e)
{
try
{
listView1.Items.Clear();
sqlcon.Open();
SqlCommand sqlcmd = new SqlCommand("select *from emp order by empcode asc", sqlcon);
//SqlDataReader dr = sqlcmd.ExecuteReader();
dr = sqlcmd.ExecuteReader();
while (dr.Read())
{
ListViewItem lv = new ListViewItem(dr["empcode"].ToString());
lv.SubItems.Add(dr["name"].ToString());
listView1.Items.Add(lv);
}
sqlcon.Close();
}
catch (Exception ex)
{
MessageBox.Show(ex.Message, Application.ProductName, MessageBoxButtons.OK, MessageBoxIcon.Error);
Application.ExitThread();
}
}
i have 4 buttons like first next last previous, i dont know how to write the code, i am new for c#..can anyone help me?
Reply
Answers (
2
)
HOw to show one row for each student in join table in datagr
Shuffle Playing Cards ?