Link to home
Start Free TrialLog in
Avatar of Sheritlw
SheritlwFlag for United States of America

asked on

Change value of where parameter

I have a gridview with a linqdatasource.
In the footer of the gridview I have a checkbox.  When a user clicks the checkbox, I need to set my where clause to active = false otherwise active = true.
I can get the checkbox in code behind so I will probably need to change it in the checkbox textchanged event.
How would I do this?

Thanks
<asp:LinqDataSource ID="lnqClientList" runat="server" 
        ContextTypeName="Service2020.SalonDataClassesDataContext" TableName="Clients" 
        Where="UserID == @UserID &amp;&amp; Active == @Active" 
      EnableDelete="True" OrderBy="FullName, LastServiceDate desc">
       <WhereParameters>
         <asp:SessionParameter DbType="Guid" Name="UserID" SessionField="UserID" />
          <asp:Parameter DefaultValue="true" Name="Active" Type="Boolean" />
      </WhereParameters>
   </asp:LinqDataSource>

Open in new window

SOLUTION
Avatar of kaufmed
kaufmed
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Sheritlw

ASKER

Figured out solution and posted it.