从当前月的1号到月底的复选框显示出来怎么做?
1 复选框  
2 复选框
3 复选框
4 复选框

解决方案 »

  1.   

    first day of month
    new DateTime(DateTime.Now.Year,DateTime.Now.Month,1)last day of month
    new DateTime(DateTime.Now.AddMonth(1).Year,DateTime.Now.AddMonth(1)..Month,1).AddDays(-1)for(...)
    {
    //add list item
    }
      

  2.   

    大概难点在于怎么在下拉列表里面弄复选框控件吧
    多数得重写combox控件了
    同学习,高手来哦
    或者查查MSDN,有没有相关例子
      

  3.   


    private void button1_Click(object sender, EventArgs e)
    {
        checkedListBox1.RightToLeft =  RightToLeft.No;  // RightToLeft.Yes 复先框在右侧
        checkedListBox1.Items.Clear();
        int days=DateTime.DaysInMonth(DateTime.Now.Year,DateTime.Now.Month);
        for (int i = 1; i <= days; i++)
        {
            checkedListBox1.Items.Add(i);
        }
    }
      

  4.   

    5楼代码补充说明:根据需要,可以控制显示效果:
    (1)设置边框显示与否
    checkedListBox1.BorderStyle = BorderStyle.None;
    (2)按多列显示
    (3)设置大小
      

  5.   

    获取当月如期形成datatable
    绑定到checkedListBox
    或List<T> lst=new List<T>();绑定到checkedListBox
    或遍历添加checkedListBox项