Hi,
I have a list box, lstjurisdictions, and when the form loads it loads records from a database.
When I select one of the items in the list box, I would like the label of a Text box to change instantly.
When I use the following code:
- private void lstJursdictions_SelectedIndexChanged(object sender, EventArgs e)
- {
- string curItem = lstJurisdictions.SelectedItem.ToString();
- textBox3.Text = curItem;
- }
All I get is the message: System.Data.DataRowView
as a label on the TextBox.
How can I get the Name of the label to change dynamically as the slected item from the list box changes?
Thank you!

Ashutosh GuptaRank #805 · 2.9K reputationPosted Jan 21, 2020, 4:16 AM EST
G F46 reputationPosted Jan 21, 2020, 8:01 PM EST
Amit MohantyRank #112 · 20K reputationPosted Jan 21, 2020, 1:18 PM EST