How do I take my GridView and create a function that will update -all-
checkbox values for the submit button's OnClick event? I have posted both my
SQLDataSource and my GridView below:
<asp:SqlDataSou rce
ID="ds_dashboar d"
runat="server"
ConnectionStrin g="<%$ ConnectionStrin gs:DashboardCon n %>"
SelectCommand=" Get_Customer_Da shboardGraphs"
SelectCommandTy pe="StoredProce dure"
UpdateCommand=" Update_Customer _DashboardGraph s"
UpdateCommandTy pe="StoredProce dure"
<UpdateParamete rs>
<asp:Paramete r Name="CustomerI D" Type="Int32" />
<asp:Paramete r Name="CurrentMo nthCollections"
Type="Int16" />
<asp:Paramete r Name="RevenueBy Month" Type="Int16" />
<asp:Paramete r Name="PDCsCCsMo nthly" Type="Int16" />
<asp:Paramete r Name="RevenueBy Client" Type="Int16" />
</UpdateParameter s>
</asp:SqlDataSour ce>
--------------------------------------------------------------------------------------
<table id="Table1" class="main_tab le" cellspacing="0" cellpadding="2"
border="1" runat="server">
<tr>
<td class="main_hea der">Filter Tool</td>
</tr>
<tr><td colspan="2"><br />For month: <asp:Label runat="server"
id="lblCurrentM onth" /><br /><br /></td></tr>
<tr><td>
<asp:GridView
ID="gv_dashboar d"
runat="server"
AutoGenerateCol umns="False"
AutoGenerateEdi tButton = "TRUE"
DataSourceID="d s_dashboard"
CellPadding="4"
ForeColor="#333 333"
ShowFooter="Tru e"
GridLines="None "
CssClass="Forma tFont">
<Columns>
<asp:TemplateFi eld HeaderText="Cus t #"
SortExpression= "CustomerID ">
<HeaderStyle HorizontalAlign ="Left"></HeaderStyle>
<ItemTemplate >
<asp:Label runat="server" id="lblCustomer ID"
Text='<%# Bind("CustomerI D") %>' />
</ItemTemplate>
</asp:TemplateFie ld>
<asp:TemplateFi eld HeaderText="Cur rent Month Collections"
SortExpression= "Name">
<HeaderStyle HorizontalAlign ="Left"></HeaderStyle>
<ItemTemplate >
<asp:checkboxfi eld runat="server"
datafield="Curr entMonthCollect ions" />
</ItemTemplate>
</asp:TemplateFie ld>
<asp:TemplateFi eld HeaderText="Rev enue By Month"
SortExpression= "Name">
<HeaderStyle HorizontalAlign ="Left"></HeaderStyle>
<ItemTemplate >
<asp:checkboxfi eld runat="server"
datafield="Reve nueByMonth" />
</ItemTemplate>
</asp:TemplateFie ld>
<asp:TemplateFi eld HeaderText="PDC s & CCS Monthly"
SortExpression= "Name">
<HeaderStyle HorizontalAlign ="Left"></HeaderStyle>
<ItemTemplate >
<asp:checkboxfi eld runat="server"
datafield="PMon thly" />
</ItemTemplate>
</asp:TemplateFie ld>
<asp:TemplateFi eld HeaderText="Rev enue By Client"
SortExpression= "Name">
<HeaderStyle HorizontalAlign ="Left"></HeaderStyle>
<ItemTemplate >
<asp:checkboxfi eld runat="server"
datafield="Reve nueByClient" />
</ItemTemplate>
</asp:TemplateFie ld>
</Columns>
<FooterStyle BackColor="#5D7 B9D" Font-Bold="True"
ForeColor="Whit e" />
<RowStyle BackColor="#F7F 6F3" ForeColor="#333 333" />
<EditRowStyle BackColor="#DDD DDD" />
<SelectedRowSty le BackColor="#DDD DDD" Font-Bold="True"
ForeColor="#333 333" />
<PagerStyle BackColor="#284 775" ForeColor="Whit e"
HorizontalAlign ="Center" />
<HeaderStyle BackColor="#5D7 B9D" Font-Bold="True"
ForeColor="Whit e" />
<AlternatingRow Style BackColor="Whit e" ForeColor="#284 775" />
</asp:GridView>
</td></tr>
<tr>
<td align="right">
<asp:Button CssClass="submi tbutton" Text="Update" ID="Button1"
OnClick="Update Fees" Runat="server" />
</td>
</tr>
</table>
--
dba123