日期:2014-05-18  浏览次数:20973 次

怎样把datetimepicker加到toolstrip上?或者直接加到reportview的工具栏上?
在做报表窗口,需要时间段统计,怎样把datetimepicker加到toolstrip上?或者直接加到reportview的工具栏上?

------解决方案--------------------
DateTimePicker dt1 = new DateTimePicker();
dt1.Width = 110;
ToolStripControlHost host1 = new ToolStripControlHost(dt1);
host1.Alignment = ToolStripItemAlignment.Right;
toolStrip1.Items.Insert(0, host1);