how to display selected checkedlistbox items in textbox separated by comma in c# |
private void checkedListBox1_SelectedIndexChanged(object sender, EventArgs e) { string values = ""; foreach (object item in checkedListBox1.CheckedItems) { if (values == "") values = item.ToString(); else values += "," + item.ToString(); } textBox1.Text = values; }
Obrigado pela publicação!
ReplyDelete