如何将CheckedListBox1中的checkitems传输到flowLayoutPanel1

时间:2019-06-28 10:23:23

标签: c# forms entity-framework textbox checkedlistbox

我在checkedListBox1中有“操作”(数据从数据库传送到checkedListBox1)。

但是数据以flowLayoutPanel1的形式进入System.Data.Entity

我尝试了以下代码:

IsEmriEkle.Instance.ucIsEmir31.flowLayoutPanel1.Controls.Clear();
 for(int i = 0; i < checkedListBox1.CheckedItems.Count; i++)
 {
   Label lbl = new Label();
   lbl.Name = checkedListBox1.CheckedItems[i].ToString();

   lbl.Text = checkedListBox1.CheckedItems[i].ToString();

   IsEmriEkle.Instance.ucIsEmir31.flowLayoutPanel1.Controls.Add(lbl);
 }

如何获取CheckedItems的值?

0 个答案:

没有答案