ho questa checkbox dentro la gridview:
codice:
               <asp:TemplateField>
                    <ItemTemplate>
                        <asp:CheckBox ID="SelectedItem" AutoPostBack="true" runat="server" OnCheckedChanged="SelectedItems_CheckedChanged" />
                    </ItemTemplate>
                </asp:TemplateField>
ho messu un pulsanre che dovrebbe richiamare un evento per cancellare tutte li righe selezionate:
codice:
        protected void Button3_Click(object sender, EventArgs e)
        {
            foreach (GridViewRow row in DecoderView.Rows)
            {
                CheckBox checkbox = (CheckBox)row.FindControl("SelectedItem");
                if (checkbox.Checked)
                {
                    richiamare_il_DeleteCommand
                }
            }
        }
come faccio a richiamare il DeleteCommand del datasource?:
codice:
    <asp:SqlDataSource ID="DecoderSql" runat="server" ConnectionString="<%$ ConnectionStrings:MYTELENEWS %>"
        DeleteCommand="DELETE FROM siti WHERE sito# = @sito#">
        <DeleteParameters>
            <asp:Parameter Name="sito#" />
        </DeleteParameters>
    </asp:SqlDataSource>