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
please See the picture below.
After webgrid executing init event, how can I custom Cloum "Total",makeTotal=count*Unitprice (it seems like "Sql statement").
Anyone can answer me?thank you!
Hello Frank,
SubTotal Columnx is an unbound column in AddCalculatedColumn.aspx. So, the footer for SubTotal column would not changed. Also, you did not mention about footer scenario last time. If you would like the footer gets updated as well, you would need to save the changes calculation and set into the footer.
Please see my attached sample. It will show you how to calculate the changes and set into the footer.Hope this helps.
Regards,Handy
In order to achieve the scenario based on your screenshot, please open our WebGridTutorial. You can find similar sample in v3.1>>AddCalculatedColumn.aspx. Hope this helps.
I’d like to assist you to provide sample of WebGrid with subtotal.
Please check following samples that available in WebGridSamples project./span> AutomaticGroupFooterUpdate.aspx This sample shows the total of grouped column in group footer. By enabling the GroupTotalVisible feature (GrouptTotalVisible=”True”, for more detail, please check line 11 of AutomaticGroupFooterUpdate.aspx file), WebGrid will shows the group footer. Next, you can simply shows the subtotal of the freight column by using the built-in aggregate function of WebGrid (AggregateFunction=”Sum” and FooterText=”Sum: “, for more detail, please check line 36 of AutomaticGroupFooterUpdate.aspx file). BatchUpdate_Enterprise.aspx This is the enterprise sample of BatchUpdate WebGrid. The sample uses hierarchical grid of [Customers] – [Orders] – [OrderDetails] of Northwind database. On [OrderDetails] child table, there is a column called “SubTotal”. This column is not available on the Northwind database. The column generated on dataset level, based on the following expression/formula: [Quantity]*[UnitPrice]-([Quantity]*[UnitPrice]*Discount). For more detail information about the formula, please check the “Expression” property of SubTotal DataColumn in dsEnterprise.xsd dataset file. On OnInitialize client side event of the grid, CreateFormula() method is invoked. CreateFormula() method is used to creates a formula in order to calculate the value of a cell, in this case is the “SubTotal” cell of OrderDetails table. For more detail information about this, please check line 17 of BatchUpdate_Enterprise.aspx file. On the column footer of “SubTotal” column, there is also the result of sum aggregate of the “SubTotal” column. This can be achieved simply by enabling ColumnFooters feature (ColumnFooters=”Yes”, for more detail, please check line 180 of BatchUpdate_Enterprise.aspx sample) of LayoutSettings; set the AggregateFunction of “SubTotal” column to “Sum” (AggregateFunction=”Sum”, for more detail, please check line 69 of BatchUpdate_Enterprise.aspx file). You may change the column footer text by setting the FooterText property (for more detail, please check line 71 of BatchUpdate_Enterprise.aspx file). BuiltinAggregation.aspx This sample shows the sum of UnitsInStock column; max value of UnitPrice column; and average value of UnitsOnOrder column by using the built-in aggregate of WebGrid. This sample demonstrates how WebGrid can be binded to expression-based column. In this sample, Products table that is bind to WebGrid, does not have TotalAsset column. TotalAsset is an expression-based column, which formula is specified in dsNorthwind.cs file. DisplayAggregateinGroupHeader.aspx This sample demonstrates the ability to display basic aggregate functions in group header. Although built-in Aggregate Functions are available in WebGridColumn, you need to enable GroupTotal feature. When enabled, a special total row will appear after the group header to display each calculated values of aggregate functions defined in specific WebGridColumn. Enterprise.aspx The explanation of this sample is identic with the BatchUpdate_Enterprise.aspx sample file. GroupFooterTotal.aspx You can also show the result of aggregate function in group footer total. You may also would like to check the new sample of ClientBinding_PreloadGroupTotals.aspx that comes with the new installer of Intersoft WebUI Studio Installer. Could you please let us know which one of the sample that suit your scenario at most so that we can assist you better on the functionality and the feature? Or if you have different scenario, please feel free to contact us.
AutomaticGroupFooterUpdate.aspx
This sample shows the total of grouped column in group footer. By enabling the GroupTotalVisible feature (GrouptTotalVisible=”True”, for more detail, please check line 11 of AutomaticGroupFooterUpdate.aspx file), WebGrid will shows the group footer. Next, you can simply shows the subtotal of the freight column by using the built-in aggregate function of WebGrid (AggregateFunction=”Sum” and FooterText=”Sum: “, for more detail, please check line 36 of AutomaticGroupFooterUpdate.aspx file).
BatchUpdate_Enterprise.aspx
This is the enterprise sample of BatchUpdate WebGrid. The sample uses hierarchical grid of [Customers] – [Orders] – [OrderDetails] of Northwind database. On [OrderDetails] child table, there is a column called “SubTotal”. This column is not available on the Northwind database. The column generated on dataset level, based on the following expression/formula: [Quantity]*[UnitPrice]-([Quantity]*[UnitPrice]*Discount). For more detail information about the formula, please check the “Expression” property of SubTotal DataColumn in dsEnterprise.xsd dataset file.
On OnInitialize client side event of the grid, CreateFormula() method is invoked. CreateFormula() method is used to creates a formula in order to calculate the value of a cell, in this case is the “SubTotal” cell of OrderDetails table. For more detail information about this, please check line 17 of BatchUpdate_Enterprise.aspx file.
On the column footer of “SubTotal” column, there is also the result of sum aggregate of the “SubTotal” column. This can be achieved simply by enabling ColumnFooters feature (ColumnFooters=”Yes”, for more detail, please check line 180 of BatchUpdate_Enterprise.aspx sample) of LayoutSettings; set the AggregateFunction of “SubTotal” column to “Sum” (AggregateFunction=”Sum”, for more detail, please check line 69 of BatchUpdate_Enterprise.aspx file). You may change the column footer text by setting the FooterText property (for more detail, please check line 71 of BatchUpdate_Enterprise.aspx file).
BuiltinAggregation.aspx
This sample shows the sum of UnitsInStock column; max value of UnitPrice column; and average value of UnitsOnOrder column by using the built-in aggregate of WebGrid.
This sample demonstrates how WebGrid can be binded to expression-based column. In this sample, Products table that is bind to WebGrid, does not have TotalAsset column. TotalAsset is an expression-based column, which formula is specified in dsNorthwind.cs file.
DisplayAggregateinGroupHeader.aspx
This sample demonstrates the ability to display basic aggregate functions in group header. Although built-in Aggregate Functions are available in WebGridColumn, you need to enable GroupTotal feature. When enabled, a special total row will appear after the group header to display each calculated values of aggregate functions defined in specific WebGridColumn.
Enterprise.aspx
The explanation of this sample is identic with the BatchUpdate_Enterprise.aspx sample file.
GroupFooterTotal.aspx
You can also show the result of aggregate function in group footer total.
You may also would like to check the new sample of ClientBinding_PreloadGroupTotals.aspx that comes with the new installer of Intersoft WebUI Studio Installer.
Could you please let us know which one of the sample that suit your scenario at most so that we can assist you better on the functionality and the feature? Or if you have different scenario, please feel free to contact us.
I am sorry,although it has achieved Total=count*Unitprice ,Total 's footerText has not changed when I change "count column" or "Unitprice column".Anyway,when I change "count column" or "Unitprice column".I want to get the newest Total 's footerTextCan you give me one solution? thank you
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