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
ISData Adapter Code:
public class CustomersISDataAdapter { public CustomersISDataAdapter() { } private Customers _lastCustomers = null; public CustomersISDataCollection GetData(string sortExpression, int maximumRows, int startRowIndex) { Customers items = Customers.GetCustomers(startRowIndex, maximumRows); this._lastCustomers = items; CustomersISDataCollection dataCollection = CustomersISDataCollection.CreateISDataCollection(items); return dataCollection; } public int SelectCount(string sortExpression) { return this._lastCustomers.MaxRowIndex; } }
For some reason the GetData method is always called twice.
It's called twice when the page loads and twice everytime I page.No grid events are being handled in the code behind.
I have two questions:1) How can I stop the GetData call being made twice.2) Why does the return object of GetData need to inherit IHierarchicalList. I can do theGrid.DataSource = theCustomers, where theCustomers is of type CUstomers, and it works fine...but returning a Customers object gives an error when using the ISDataSource saying the collection must implement IHierarchicalList. This means I have to take my customer objects and add them to a special collection before I return them.
cheers,
Steve
Hi,
I have this almost working now.
Page Source Source:
<ISWebGrid:WebGrid ID="WebGrid2" runat="server" Height="250px" UseDefaultStyle="True" Width="500px" DataSourceID="ISDataSource1"> <LayoutSettings PagingLoadMode="Custom" PagingMode="ClassicPaging" PagingStyleUI="Slider" PagingDataRetrievalMode="ReturnPartialRows" PagingSize="20"> </LayoutSettings> <RootTable> <Columns> <ISWebGrid:WebGridColumn Name="CustomerId" Caption="Customer Id" DataMember="CustomerId" /> <ISWebGrid:WebGridColumn Name="DisplayName" Caption="Display Name" DataMember="DisplayName" Width="200"/> </Columns> </RootTable> </ISWebGrid:WebGrid> <ISDataSource:ISDataSource ID="ISDataSource1" runat="server" SchemaType="CustomObject" LoadOnDemand="true"> <Tables> <ISDataSource:ISDataSourceTable SelectMethod="GetData" SelectCountMethod="SelectCount" TableName="Customers" EnablePaging="true" TypeName="WebGridPaging.CustomersISDataAdapter" > </ISDataSource:ISDataSourceTable> </Tables> </ISDataSource:ISDataSource>
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