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
If there is a custom aggregate column and you enable client binding there is a javascript error.
which should be
try client binding on CustomAggregation.aspx and you will see the issue.
Karl
Hi Karl,
I could replicate your issue. It caused OnCustomAggregate method always get a null value.I have forwarded your issue to our development team for further investigation. I will let you know for any updates from them as soon as possible.Thank you Karl.Riendy
The hotfix for the reported problem in this thread will be available in September hotfix which will be available in the last week of this month.
I also would like to remind that the way to implement custom aggregate on client-binding WebGrid is different from the server-binding WebGrid. Following properties are need to be set in order to use custom aggregate in both scenario, client-binding WebGrid and server-binding WebGrid:
<ISWebGrid:WebGrid ID="WebGrid1" runat="server" ...> ... <RootTable DataKeyField="CustomerID" ColumnFooters="Yes"> <Columns> ... </Columns> </RootTable> </ISWebGrid:WebGrid>
<RootTable DataKeyField="CustomerID" ColumnFooters="Yes"> <Columns> ... <ISWebGrid:WebGridColumn Caption="CompanyName" DataMember="CompanyName" Name="CompanyName" Width="100px" AggregateFunction="Custom"> </ISWebGrid:WebGridColumn> ... </Columns> </RootTable>
<RootTable DataKeyField="CustomerID" ColumnFooters="Yes"> <Columns> ... <ISWebGrid:WebGridColumn Caption="CompanyName" DataMember="CompanyName" Name="CompanyName" Width="100px" AggregateFunction="Custom" FooterText="Count : "> </ISWebGrid:WebGridColumn> ... </Columns> </RootTable>
Please note that when used in client-binding WebGrid, put the aggregate logic in OnCustomAggregate client-side event of WebGrid. This is different from server-binding WebGrid where the aggregate logic is placed in OnCustomAggregate server-side event of WebGrid. Following snippet code, WebGrid will count the total of Customers from Germany; and show the aggregate result in the footer text of CompanyName column.
function WebGrid1_OnCustomAggregate(controlId, columns, rows, type) { var grid = ISGetObject(controlId); // every column that have its AggregateFunction set to Custom // will invoke this event when aggregate calculation is needed. // so we need to check against the Column's Name or DataMember // depend on your application's design. if (columns.Name == "CompanyName") { var count = 0; var aggregateResult = 0; //debugger; // loop through all rows while (count < rows.length) { // only count if country is "Germany". if (rows[count].Cells.GetNamedItem("Country").Value == "Germany") aggregateResult++; count++; } // return the result. return aggregateResult; } }
Hope this help.
Thank you! We are using the client-side customaggregate that you describe and the javascript error still occurs. Please confirm that the September hotfix is still on schedule for the week of 9/29.
I have tested the nightly build of WebGrid 8 using a simple sample of client-side custom aggreagate and find that the reported problem is no longer persist. The release version of this hotfix will be available in the next couple of days.
Please advise when the release version of the hotfix will be available. There doesn't appear to be an update on the Support page as of yet.
I enclosed the nightly build of WebGrid which implements the bugfix for client binding - custom aggregate scenario. Please download the attached hotfix and apply to your project. Feel free to let me know if the problem still persist.
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