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.7k
populate data from listview to radiobutton?
Oct 11 2013 3:53 PM
Hi,
How to populate listview data to radio button like gender column?
I have listview like id, name, gender, i easily populate id, name respectivly to textbox but i am not sucess when i populate gender(male, female) field to radio button?
can u anyone help me?
here my code:
private void listView1_SelectedIndexChanged(object sender, EventArgs e)
{
if (listView1.SelectedItems.Count > 0)
{
ListViewItem lvi = listView1.SelectedItems[0];
txtEmpCode.Text = lvi.SubItems[0].Text;
txtName.Text = lvi.SubItems[1].Text;
if (Male.Text == "Male") // Male is radio button name
{
Male.Visible = true;
Female.Visible = false;
}
else if (Female.Text == "Female") // Female is radio button name
{
Male.Visible = false;
Female.Visible = true;
}
}
else
{
txtEmpCode.Text = string.Empty;
txtName.Text = string.Empty;
}
}
Reply
Answers (
2
)
Accessing Network Profile Information in Windows Store Apps
setup & deploy software