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
Is there a away to show the total number of rows on the grid with paging. For example I have the following set in the LayoutSettings attribute:
PagingMode="ClassicPaging" PagingSize="500"
The scenario I have is: I have 1376 rows total. However what's showing at the bottom is Page 1 of 3. This is valid but I would also like to see 1 of 3 for a total of 1376 OR some where on the footer the ability to see the total rows of the criteria. Is this possible?
I have just been informed by the developer that this feature has already been supported. You will need to set ColumnFooterAggegrateMode to CalculateAllData to calculate all the row using aggegrate count function.
Here is the snippet:
<ISWebGrid:WebGrid ID="WebGrid1" runat="server" Height="316px" UseDefaultStyle="True" Width="644px" DefaultStyleMode="Elegant" OnInitializeDataSource="WebGrid1_InitializeDataSource" DataSourceID="AccessDataSource1"> <LayoutSettings AllowEdit="Yes" PagingMode="ClassicPaging" PagingStyleUI="Slider" PagingSliderWidth="120" AllowColumnFreezing="Yes" AllowColumnMove="Yes" AllowFilter="Yes" AllowGrouping="Yes" AllowSorting="Yes" PagingDetectPartialGroupRows="True" ColumnFooters="Yes" ColumnFooterAggregateMode="CalculateAllData"> <FreezePaneSettings ActiveFrozenColumns="2" /> </LayoutSettings> <RootTable DataKeyField="OrderID"> <Columns> <ISWebGrid:WebGridColumn Caption="OrderID" DataMember="OrderID" DataType="System.Int32" Name="OrderID" Width="100px" AggregateFunction="Count" FooterText="Total: "> </ISWebGrid:WebGridColumn> <ISWebGrid:WebGridColumn Caption="CustomerID" DataMember="CustomerID" Name="CustomerID" Width="100px"> </ISWebGrid:WebGridColumn> <ISWebGrid:WebGridColumn Caption="EmployeeID" DataMember="EmployeeID" DataType="System.Int32" Name="EmployeeID" Width="100px"> </ISWebGrid:WebGridColumn> <ISWebGrid:WebGridColumn Caption="OrderDate" DataMember="OrderDate" DataType="System.DateTime" Name="OrderDate" Width="100px"> </ISWebGrid:WebGridColumn> <ISWebGrid:WebGridColumn Caption="RequiredDate" DataMember="RequiredDate" DataType="System.DateTime" Name="RequiredDate" Width="100px"> </ISWebGrid:WebGridColumn> <ISWebGrid:WebGridColumn Caption="ShippedDate" DataMember="ShippedDate" DataType="System.DateTime" Name="ShippedDate" Width="100px"> </ISWebGrid:WebGridColumn> <ISWebGrid:WebGridColumn Caption="ShipVia" DataMember="ShipVia" DataType="System.Int32" Name="ShipVia" Width="100px"> </ISWebGrid:WebGridColumn> <ISWebGrid:WebGridColumn Caption="Freight" DataMember="Freight" DataType="System.Decimal" Name="Freight" Width="100px"> </ISWebGrid:WebGridColumn> <ISWebGrid:WebGridColumn Caption="ShipName" DataMember="ShipName" Name="ShipName" Width="100px"> </ISWebGrid:WebGridColumn> <ISWebGrid:WebGridColumn Caption="ShipAddress" DataMember="ShipAddress" Name="ShipAddress" Width="100px"> </ISWebGrid:WebGridColumn> <ISWebGrid:WebGridColumn Caption="ShipCity" DataMember="ShipCity" Name="ShipCity" Width="100px"> </ISWebGrid:WebGridColumn> <ISWebGrid:WebGridColumn Caption="ShipRegion" DataMember="ShipRegion" Name="ShipRegion" Width="100px"> </ISWebGrid:WebGridColumn> <ISWebGrid:WebGridColumn Caption="ShipPostalCode" DataMember="ShipPostalCode" Name="ShipPostalCode" Width="100px"> </ISWebGrid:WebGridColumn> <ISWebGrid:WebGridColumn Caption="ShipCountry" DataMember="ShipCountry" Name="ShipCountry" Width="100px"> </ISWebGrid:WebGridColumn> </Columns> </RootTable></ISWebGrid:WebGrid>
This feature is not supported yet in WebGrid. However using column footer and custom aggegrate function, you could show the total row of the table in the column footer. We have already provide an article titled "Walkthrough: Using Custom Aggregate function in WebGrid" in the WebGrid docs. In order to retrieve the total row in the table you will need to re-query the data since the WebGrid does not supply this information.
Do you think this will be supported soon? I would hate re-query the data to get the total number of rows regardless if I'm paging or not. This is something our users use quite frequently.
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