I always get all rows from teh db filter has no effect
<ig:WebDataGrid ID="gPayments" runat="server" Width="100%" StyleSetName="Office2007Blue" EnableAjax="False" OnDataBinding="gPayments_DataBinding" OnRowSelectionChanged="gPayments_RowSelectionChanged" AutoGenerateColumns="False" DataSourceID="sqlPayments">
<asp:SqlDataSource ID="sqlPayments" runat="server" ConnectionString="<%$ ConnectionStrings:HomeConnectionString %>" FilterExpression="ID = {0}" SelectCommand="SELECT ID, Rent, Housekeep FROM Leases"> <FilterParameters> <asp:Parameter Name="ID" Type="Int32" /> </FilterParameters> </asp:SqlDataSource>
at code behind
protected void gPayments_DataBinding(object sender, EventArgs e) { sqlPayments.FilterParameters["ID"].DefaultValue =Session["sqlPay"].ToString(); }
version
Infragistics45.Web.v18.2, Version=18.2.20182.192
And what happens to the ID string - there are no restrictions on it, and setting its specific value gives something? Perhaps a mistake in this.
Hi Tinhav,
I am not able to reproduce such behavior on my side. In order to help you, I will need an isolated sample that I can run and investigate on my side.
Please isolate the issue in a sample and use an SQL Database file to load data from via SQlDataSource.
I am looking forward to hearing from you.
Yes, exactly, looks like it is not working when setting the filter in the DataBinding event/
Do you mean that despite the Filter, the WebDataGrid displays all the records client side ? I am not able to replicate such behavior. Please provide a sample that I can run on my side and investigate such behavior.