﻿<?xml version="1.0" encoding="utf-8"?><rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:sy="http://purl.org/rss/1.0/modules/syndication/" xmlns:media="http://search.yahoo.com/mrss/" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" version="2.0"><channel><title>Intersoft Community - WebGrid Enterprise - Error with clientbinding and customaggreagte</title><link>http://www.intersoftsolutions.com/Community/WebGrid/Error-with-clientbinding-and-customaggreagte/</link><description /><generator>http://www.intersoftsolutions.com</generator><language>en</language><copyright>Copyright 2002 - 2015 Intersoft Solutions Corp. All rights reserved.</copyright><ttl>60</ttl><item><title>Error with clientbinding and customaggreagte</title><link>http://www.intersoftsolutions.com/Community/WebGrid/Error-with-clientbinding-and-customaggreagte/</link><pubDate>Thu, 09 Oct 2014 04:17:39 GMT</pubDate><dc:creator>yudi</dc:creator><description>&lt;p&gt;&lt;span style="color: #1f497d;"&gt;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.&lt;/span&gt;&lt;/p&gt;</description></item><item><title>Error with clientbinding and customaggreagte</title><link>http://www.intersoftsolutions.com/Community/WebGrid/Error-with-clientbinding-and-customaggreagte/</link><pubDate>Fri, 03 Oct 2014 13:28:10 GMT</pubDate><dc:creator>cvgierloff</dc:creator><description>&lt;p&gt;Please advise when the release version of the hotfix will be available.&amp;nbsp; There doesn't appear to be an update on the Support page as of yet.&lt;br&gt;&lt;/p&gt;</description></item><item><title>Error with clientbinding and customaggreagte</title><link>http://www.intersoftsolutions.com/Community/WebGrid/Error-with-clientbinding-and-customaggreagte/</link><pubDate>Mon, 29 Sep 2014 02:36:46 GMT</pubDate><dc:creator>yudi</dc:creator><description>&lt;p&gt;&lt;span style="color: #1f497d;"&gt;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.&lt;/span&gt;&lt;/p&gt;</description></item><item><title>Error with clientbinding and customaggreagte</title><link>http://www.intersoftsolutions.com/Community/WebGrid/Error-with-clientbinding-and-customaggreagte/</link><pubDate>Fri, 26 Sep 2014 16:25:20 GMT</pubDate><dc:creator>cvgierloff</dc:creator><description>&lt;p&gt;Thank you!&amp;nbsp; We are using the client-side&amp;nbsp;customaggregate that you describe and the javascript error still occurs.&amp;nbsp; Please confirm that the September hotfix is still on schedule for the week of 9/29.&lt;br&gt;&lt;/p&gt;</description></item><item><title>Error with clientbinding and customaggreagte</title><link>http://www.intersoftsolutions.com/Community/WebGrid/Error-with-clientbinding-and-customaggreagte/</link><pubDate>Fri, 19 Sep 2014 02:58:49 GMT</pubDate><dc:creator>yudi</dc:creator><description>&lt;p&gt;&lt;span style="color: #1f497d;"&gt;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.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="color: #1f497d;"&gt;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:&lt;/span&gt;&lt;/p&gt;&lt;ul style="color: #1f497d;"&gt;&lt;li&gt;Enable &lt;strong&gt;ColumnFooters&lt;/strong&gt; property of &lt;em&gt;RootTable&lt;/em&gt;. Example:&lt;br&gt;&lt;pre&gt;&amp;lt;ISWebGrid:WebGrid ID="WebGrid1" runat="server" ...&amp;gt;    ...
    &amp;lt;RootTable DataKeyField="CustomerID" ColumnFooters="Yes"&amp;gt;
        &amp;lt;Columns&amp;gt;
            ...
        &amp;lt;/Columns&amp;gt;
    &amp;lt;/RootTable&amp;gt;
&amp;lt;/ISWebGrid:WebGrid&amp;gt;&lt;/pre&gt;&lt;/li&gt;&lt;li&gt;Set &lt;strong&gt;AggregateFunction&lt;/strong&gt; of &lt;em&gt;WebGridColumn&lt;/em&gt; to &lt;strong&gt;Custom&lt;/strong&gt;. Example:&lt;br&gt;&lt;pre&gt;&amp;lt;RootTable DataKeyField="CustomerID" ColumnFooters="Yes"&amp;gt;
    &amp;lt;Columns&amp;gt;
        ...
        &amp;lt;ISWebGrid:WebGridColumn Caption="CompanyName"
            DataMember="CompanyName" Name="CompanyName"
            Width="100px" AggregateFunction="Custom"&amp;gt;
        &amp;lt;/ISWebGrid:WebGridColumn&amp;gt;
        ...
    &amp;lt;/Columns&amp;gt;
&amp;lt;/RootTable&amp;gt;&lt;/pre&gt;&lt;/li&gt;&lt;li&gt;Set &lt;strong&gt;FooterText&lt;/strong&gt; property of &lt;em&gt;WebGridColumn&lt;/em&gt; [optional]. Example:&lt;/li&gt;&lt;br&gt;&lt;pre&gt;&amp;lt;RootTable DataKeyField="CustomerID" ColumnFooters="Yes"&amp;gt;
    &amp;lt;Columns&amp;gt;
        ...
        &amp;lt;ISWebGrid:WebGridColumn Caption="CompanyName"
            DataMember="CompanyName" Name="CompanyName"
            Width="100px" AggregateFunction="Custom" FooterText="Count : "&amp;gt;
        &amp;lt;/ISWebGrid:WebGridColumn&amp;gt;
        ...
    &amp;lt;/Columns&amp;gt;
&amp;lt;/RootTable&amp;gt;&lt;/pre&gt;&lt;/ul&gt;
&lt;p&gt;&lt;span style="color: #1f497d;"&gt;Please note that when used in client-binding WebGrid, &lt;strong&gt;put the aggregate logic in OnCustomAggregate client-side event of WebGrid&lt;/strong&gt;. 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.&lt;/span&gt;&lt;/p&gt;
&lt;pre&gt;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 &amp;lt; rows.length)
        {
            // only count if country is "Germany".
            if (rows[count].Cells.GetNamedItem("Country").Value == "Germany")
                aggregateResult++;

            count++;
        }

        // return the result.
        return aggregateResult;
    }
}&lt;/pre&gt;
&lt;p&gt;&lt;span style="color: #1f497d;"&gt;Hope this help.&lt;/span&gt;&lt;/p&gt;</description></item><item><title>Error with clientbinding and customaggreagte</title><link>http://www.intersoftsolutions.com/Community/WebGrid/Error-with-clientbinding-and-customaggreagte/</link><pubDate>Wed, 17 Sep 2014 23:26:40 GMT</pubDate><dc:creator>cvgierloff</dc:creator><description>Is there a solution to this problem?&lt;br&gt;</description></item><item><title>Error with clientbinding and customaggreagte</title><link>http://www.intersoftsolutions.com/Community/WebGrid/Error-with-clientbinding-and-customaggreagte/</link><pubDate>Sun, 31 Jul 2011 23:38:54 GMT</pubDate><dc:creator>Riendy</dc:creator><description>&lt;p&gt;Hi Karl,&lt;/p&gt;&lt;p&gt;&lt;br /&gt;I could replicate your issue. It caused OnCustomAggregate method always get a null value.&lt;br /&gt;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.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Thank you Karl.&lt;br /&gt;Riendy&lt;/p&gt;</description></item><item><title>Error with clientbinding and customaggreagte</title><link>http://www.intersoftsolutions.com/Community/WebGrid/Error-with-clientbinding-and-customaggreagte/</link><pubDate>Thu, 28 Jul 2011 22:29:01 GMT</pubDate><dc:creator>karlp@agrecon.com</dc:creator><description>&lt;p&gt;If there is a custom aggregate column and you enable client binding there is a javascript error.&lt;/p&gt;&lt;span style="font-family: consolas; color: #0000ff; font-size: 13px"&gt;&lt;span style="font-family: consolas; color: #0000ff; font-size: 13px"&gt;&lt;span style="font-family: consolas; color: #0000ff; font-size: 13px"&gt;var&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: consolas; font-size: 13px"&gt;&lt;span style="font-family: consolas; font-size: 13px"&gt; vf7178 =ISEvent.Raise(vb8528.ClientSideEvents.OnCustomAggregate,vb8528.Id,vf7470,v2d715,v4946);&lt;/span&gt;&lt;/span&gt; 

&lt;p&gt;&lt;span style="font-family: consolas; font-size: 13px"&gt;&lt;span style="font-family: consolas; font-size: 13px"&gt;&lt;/span&gt;&lt;/span&gt; &lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: consolas; font-size: 13px"&gt;&lt;span style="font-family: consolas; font-size: 13px"&gt;which should be &lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;span style="font-family: consolas; font-size: 13px"&gt;&lt;span style="font-family: consolas; font-size: 13px"&gt;&lt;span style="font-family: consolas; color: #0000ff; font-size: 13px"&gt;&lt;span style="font-family: consolas; color: #0000ff; font-size: 13px"&gt;&lt;span style="font-family: consolas; color: #0000ff; font-size: 13px"&gt;var&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: consolas; font-size: 13px"&gt;&lt;span style="font-family: consolas; font-size: 13px"&gt; vf7178 =ISEvent.Raise(vb8528&lt;strong&gt;.LayoutSettings&lt;/strong&gt;.ClientSideEvents.OnCustomAggregate,vb8528.Id,vf7470,v2d715,v4946);&lt;/span&gt;&lt;/span&gt; 

&lt;p&gt; &lt;/p&gt;
&lt;p&gt;try client binding on CustomAggregation.aspx  and you will see the issue.&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;Karl&lt;/p&gt;&lt;/span&gt;&lt;/span&gt;</description></item></channel></rss>