iSeller Commerce
iSeller POS Retail
iSeller POS F&B
iSeller POS Express
Crosslight
WebUI
ClientUI
What's New
Download Trial
Web Solution
Mobile Solution
Enterprise Solution
Custom Development
Blog
Community
Latest Development Blogs
ForumPostTopic
Browse By Tag
I've found a problem where a WebGrid, which is bound to a ISDataSource, is not showing filtered data, even though the ISDatasource is filtered. I'm using the latest dlls from WebStudio 2011 R1 SP1.
Let me explain. Below is some very basic code - there is nothing on the code behind page, it's all on the aspx page. There's a webGrid, and asp:GridView, and a ISDataSource. The ISData source is connected to a database table, and it has a FilterExpression to limit the data that is returned.
Now, Both the WebGrid and the asp:GridView are bound to this ISDataSource. I expect the WebGrid to show the filtered data, but it doesn't, the WebGrid shows all of the data from the datasource, not the filtered data.
Yet, the asp:GridView, which is bound to the very same ISDataSource control, does show just the filtered data.
If both controls are bound to the same datasource, why don't they show the same data? Please explain how I can get the WebGrid to show the filtered data that the ISDataSource is providing. I do not want to use the filtering that is part of the WebGrid, I want the filtering to be done in the ISDatasource.
Thanks, Jim
<ISWebGrid:WebGrid ID="WebGrid1" runat="server" DataMember="Summaries_WebCatFilters" DataSourceID="ISDataSource2" Height="250px" UseDefaultStyle="True" > <RootTable DataKeyField="Pid" > <Columns> <ISWebGrid:WebGridColumn Caption="Pid" DataMember="Pid" DataType="System.Int32" Name="Pid" Width="100px"> </ISWebGrid:WebGridColumn> <ISWebGrid:WebGridColumn Caption="FullPartNumber" DataMember="FullPartNumber" Name="FullPartNumber" Width="100px"> </ISWebGrid:WebGridColumn> </Columns> </RootTable> </ISWebGrid:WebGrid> <asp:GridView ID="GridView1" runat="server" AllowPaging="True" AutoGenerateColumns="False" CssClass="text" DataKeyNames="FullPartNumber" DataSourceID="ISDataSource2" Width="100%"> <Columns> <asp:BoundField DataField="Pid" HeaderText="Pid" InsertVisible="False" ReadOnly="True" SortExpression="Pid" /> <asp:BoundField DataField="FullPartNumber" HeaderText="FullPartNumber" InsertVisible="False" ReadOnly="True" SortExpression="FullPartNumber" /> </Columns> <PagerStyle CssClass="pager" /> <HeaderStyle CssClass="header" /> </asp:GridView> <ISDataSource:ISDataSource ID="ISDataSource2" runat="server" SchemaName="WebSpecMaster.App_Code.DataSet_ISISWebStaging"> <Tables> <ISDataSource:ISDataSourceTable SelectMethod="GetData" TableName="Summaries_WebCatFilters" FilterExpression="FullPartNumber Like '12345'" TypeName="WebSpecMaster.App_Code.DataSet_ISISWebStagingTableAdapters.Summaries_WebCatFiltersTableAdapter"> </ISDataSource:ISDataSourceTable> </Tables> </ISDataSource:ISDataSource>
Hi,
I can replicate your issue. I would try to discuss with our developer teams regarding this matter. I will let you know when it's done.
Regards,Handy
Hello,
Based on discussion with our developer teams, unfortunately, it is not a bug. Using FilterExpression does not mean the operation done in server. In server, ISDataSource still selects based on your SelectMethod. There is no filter expression in query at all. So, basically, filter expression process is done in client side process.Since WebGrid has its own mechanism for filtering, filter expression from ISDataSource would be reset because it is client side operation.
Hello Jim,
Yes, We understand. But WebGrid has its own mechanism. If you want, you can filter or bind by using WebCombo or others control as parameter. I send you my sample include how to modify sorting from javascript.
or
Choose this if you're already a member of Intersoft Community Forum. You can link your OpenID account to your existing Intersoft Social ID.
Choose this if you don't have an Intersoft account yet. Your authenticated OpenID will be automatically linked to your new Intersoft account.
Enter your Wordpress Blogname