gridview里面有三列时间列,更新时通过checkbox来选择那几个列需要去getdate()函数的值,求大神们解决 在线等 怎么写函数 怎么判断CheckBoxGridViewc#

解决方案 »

  1.   

    需要不明。我就自己开发的东西说下,首先肯定是自定义列了,加几个
    <asp:TemplateField HeaderText="弹出">
                     <HeaderStyle Width="40px"></HeaderStyle>
                     <ItemStyle HorizontalAlign="Center"></ItemStyle>
     <ItemTemplate>
      <asp:CheckBox id="cbPopu" runat="server" Checked='<%#DataBinder.Eval(Container.DataItem, "IsPopu")%>'>
        </asp:CheckBox>
     </ItemTemplate>
    </asp:TemplateField>
    <asp:TemplateField HeaderText="置顶">
                     <HeaderStyle Width="40px"></HeaderStyle>
                     <ItemStyle HorizontalAlign="Center"></ItemStyle>
     <ItemTemplate>
      <asp:CheckBox id="cbTop" runat="server" Checked='<%#DataBinder.Eval(Container.DataItem, "IsTop")%>'>
        </asp:CheckBox>
     </ItemTemplate>
    </asp:TemplateField>然后,更新的时候,你可以遍历,通过findcontrol来查找哪些列被选中了,然后你再更新下次请说得具体些
      

  2.   

    列类型设置为boolean,ColumnEdit设置为CheckEdit就可以了。
    每次取值判断,如果是true,就在sql中拼进去这段子句。
      

  3.   

    看看这个 http://www.cnblogs.com/woshare/archive/2012/12/01/2797244.html