日期:2014-05-17 浏览次数:20451 次
<asp:GridView ID="gridView" runat="server" AutoGenerateColumns="False" ShowHeader="True"
Width="100%">
<Columns>
<asp:TemplateField>
<HeaderTemplate>
<input type='checkbox' id='chkAllSelect' name='chkAllSelect' onclick="CheckAll(this)"
runat="server" />
</HeaderTemplate>
<ItemTemplate>
<input type="checkbox" id="chkSelect" name="chkSelect" runat="server" value='<%# Eval("Did")%> ' />
</ItemTemplate>
<ItemStyle Width="20px" />
</asp:TemplateField>
</Columns>
</asp:GridView>
//创建列的方法
public void CreateGridView(GridView dataview, int year, int month)
{
int i;
int CurMonthDay = DateTime.DaysInMonth(year, month);
int count = dataview.Columns.Count;
for (i = 1; i < count; i++)