The given key was not present in the dictionary

18 posts, 0 answers
  1. Greg
    Greg avatar
    13 posts
    Member since:
    Oct 2008

    Posted 21 Jul 2011 Link to this post

    Has anyone encountered this error with RadGrid (2009Q3)?

    [KeyNotFoundException: The given key was not present in the dictionary.]

    System.ThrowHelper.ThrowKeyNotFoundException() +28

    System.Collections.Generic.Dictionary`2.get_Item(TKey key) +7456108

    Telerik.Web.UI.RadGrid.LoadClientState(Dictionary`2 clientState) +138

    Telerik.Web.UI.RadCompositeDataBoundControl.LoadPostData(String postDataKey, NameValueCollection postCollection) +123

    Telerik.Web.UI.RadCompositeDataBoundControl.System.Web.UI.IPostBackDataHandler.LoadPostData(String postDataKey, NameValueCollection postCollection) +13

    System.Web.UI.Page.ProcessPostData(NameValueCollection postData, Boolean fBeforeLoad) +693

    System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1743

  2. Sebastian
    Admin
    Sebastian avatar
    9934 posts

    Posted 22 Jul 2011 Link to this post

    Hi Greg,

    We are not sure what the exact cause of this error could be, however Q3 2009 is quite an old version of our ASP.NET AJAX controls. Can you migrate to a most recent release, Q2 2011 for example, to see whether this eliminates the exception?

    Best regards,
    Sebastian
    the Telerik team

    Register for the Q2 2011 What's New Webinar Week. Mark your calendar for the week starting July 18th and book your seat for a walk through of all the exciting stuff we will ship with the new release!

  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Greg
    Greg avatar
    13 posts
    Member since:
    Oct 2008

    Posted 22 Jul 2011 Link to this post

    Hi, and thank you for the reply.  Unfortunately, unless migrating to the latest version is free, it is not an option for me.  I do not have any influence on the purchasing decisions here.
  5. Sebastian
    Admin
    Sebastian avatar
    9934 posts

    Posted 22 Jul 2011 Link to this post

    Hello Greg,

    You can try the Q3 2009 SP2 version or the Q2 2011 trial version of the suite to see whether the error vanishes (upgrade instructions can be found here).

    Kind regards,
    Sebastian
    the Telerik team

    Register for the Q2 2011 What's New Webinar Week. Mark your calendar for the week starting July 18th and book your seat for a walk through of all the exciting stuff we will ship with the new release!

  6. John Swenson
    John Swenson avatar
    23 posts
    Member since:
    Jan 2010

    Posted 28 Nov 2011 Link to this post

    I have the same error using Q3 2011
    I have a grid with this fileds (among the others):

    <telerik:GridCalculatedColumn Aggregate="Sum" FilterControlWidth="50px"
                                  DataFields="Field1,Field2,Field3,Field4"
                                  DataFormatString="{0:C}" Expression="{0}+{1}+{2}+{3}"
                                  FooterAggregateFormatString="{0:C}" HeaderText="Total 1"
                                  UniqueName="Total1" DataType="System.Decimal">
        <FooterStyle HorizontalAlign="Right" Font-Bold="True" Font-Size="Small"
                     Wrap="True" ForeColor="#3333FF"/>
        <HeaderStyle Width="90px" />
        <ItemStyle HorizontalAlign="Right" Wrap="False" />
    </telerik:GridCalculatedColumn>
    <telerik:GridCalculatedColumn Aggregate="Sum" FilterControlWidth="50px"
                                  DataFields="Field1,Field2,Field3"
                                  DataFormatString="{0:C}" Expression="{0}+{1}+{2}"
                                  FooterAggregateFormatString="{0:C}" HeaderText="Total2"
                                  UniqueName="Total2" DataType="System.Decimal">
        <FooterStyle HorizontalAlign="Right" Font-Bold="True" Font-Size="Small"
                     Wrap="True" ForeColor="#3333FF"/>
        <HeaderStyle Width="90px" />
        <ItemStyle HorizontalAlign="Right" Wrap="False" />
    </telerik:GridCalculatedColumn>
    <telerik:GridBoundColumn DataField="Field1" DataType="System.Decimal"
                             HeaderText="Field1" UniqueName="Field1"
                             DataFormatString="{0:C}" Aggregate="Sum"
                             FooterAggregateFormatString="{0:C}" FilterControlWidth="50px">
        <FooterStyle HorizontalAlign="Right" Font-Bold="True" Font-Size="Small"
                     Wrap="True" ForeColor="#3333FF"/>
        <HeaderStyle Width="90px" />
        <ItemStyle HorizontalAlign="Right" Wrap="False" />
    </telerik:GridBoundColumn>

    If I comment out the first two columns, I get another error:
    System.Data.EvaluateException: Unable to find column [Field1].

    If I comment out all three columns, I get no errors at all.
  7. Radoslav
    Admin
    Radoslav avatar
    1564 posts

    Posted 30 Nov 2011 Link to this post

    Hi John,

    I tried to reproduce the described issue, but to no avail. I am sending you a simple example, based on your code snippet. Please check it out and let me know what differs in your case.

    Looking forward for your reply.

    Kind regards,
    Radoslav
    the Telerik team
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now
  8. John Swenson
    John Swenson avatar
    23 posts
    Member since:
    Jan 2010

    Posted 06 Dec 2011 Link to this post

    Finally, I was able to reproduce my problems.
    Here is the code for Default.aspx taken from your example and modified by me.
    I've setted some properties to reflect the RadGrid on my page.

    The key seems to be "EnableLinqExpressions": if you set it to "True" you get this exception:
    KeyNotFoundException: System.Collections.Generic.Dictionary`2.get_Item(TKey key) +9619597
       Telerik.Web.UI.GridCalculatedColumn.cell_DataBinding(Object sender, EventArgs e) +476

    set it to "False" to get this exception:
    HttpException (0x80004005): DataBinding: 'System.Data.DataRowView' does not contains a property named 'Total1Result'.]
       System.Web.UI.DataBinder.GetPropertyValue(Object container, String propName) +8805293
    .
    This is the page markup:
    <%@ Page Title="Home Page" Language="C#" MasterPageFile="~/Site.master" AutoEventWireup="true"
        CodeFile="Default.aspx.cs" Inherits="_Default" %>
     
    <%@ Register TagPrefix="telerik" Namespace="Telerik.Web.UI" Assembly="Telerik.Web.UI" %>
    <asp:Content ID="HeaderContent" runat="server" ContentPlaceHolderID="HeadContent">
    </asp:Content>
    <asp:Content ID="BodyContent" runat="server" ContentPlaceHolderID="MainContent">
        <telerik:RadGrid runat="server" ShowFooter="True" ID="RadGrid1"
                         AutoGenerateColumns="False" EnableLinqExpressions="False"
            AllowFilteringByColumn="True" AllowPaging="True" AllowSorting="True"
               AllowCustomPaging="True"
            CellSpacing="0" Culture="it-IT" GridLines="None" Skin="Office2007">
            <ClientSettings>
                <Selecting AllowRowSelect="True" />
                <Scrolling AllowScroll="True" UseStaticHeaders="True" />
            </ClientSettings>
            <MasterTableView>
            <CommandItemSettings ExportToPdfText="Export to PDF"></CommandItemSettings>
            <RowIndicatorColumn Visible="True" FilterControlAltText="Filter RowIndicator column"></RowIndicatorColumn>
            <ExpandCollapseColumn Visible="True" FilterControlAltText="Filter ExpandColumn column"></ExpandCollapseColumn>
                <Columns>
                    <telerik:GridCalculatedColumn Aggregate="Sum" FilterControlWidth="50px" DataFields="Field1,Field2,Field3,Field4"
                        DataFormatString="{0:C}" Expression="{0}+{1}+{2}+{3}" FooterAggregateFormatString="{0:C}"
                        HeaderText="Total 1" UniqueName="Total1" DataType="System.Decimal">
                        <FooterStyle HorizontalAlign="Right" Font-Bold="True" Font-Size="Small" Wrap="True"
                            ForeColor="#3333FF" />
                        <HeaderStyle Width="90px" />
                        <ItemStyle HorizontalAlign="Right" Wrap="False" />
                    </telerik:GridCalculatedColumn>
                    <telerik:GridCalculatedColumn Aggregate="Sum" FilterControlWidth="50px" DataFields="Field1,Field2,Field3"
                        DataFormatString="{0:C}" Expression="{0}+{1}+{2}" FooterAggregateFormatString="{0:C}"
                        HeaderText="Total2" UniqueName="Total2" DataType="System.Decimal">
                        <FooterStyle HorizontalAlign="Right" Font-Bold="True" Font-Size="Small" Wrap="True"
                            ForeColor="#3333FF" />
                        <HeaderStyle Width="90px" />
                        <ItemStyle HorizontalAlign="Right" Wrap="False" />
                    </telerik:GridCalculatedColumn>
                    <telerik:GridBoundColumn DataField="Field1" DataType="System.Decimal" HeaderText="Field1"
                        UniqueName="Field1" DataFormatString="{0:C}" Aggregate="Sum" FooterAggregateFormatString="{0:C}"
                        FilterControlWidth="50px">
                        <FooterStyle HorizontalAlign="Right" Font-Bold="True" Font-Size="Small" Wrap="True"
                            ForeColor="#3333FF" />
                        <HeaderStyle Width="90px" />
                        <ItemStyle HorizontalAlign="Right" Wrap="False" />
                    </telerik:GridBoundColumn>
                </Columns>
     
    <EditFormSettings>
    <EditColumn FilterControlAltText="Filter EditCommandColumn column"></EditColumn>
    </EditFormSettings>
            </MasterTableView>
     
    <FilterMenu EnableImageSprites="False">
    <WebServiceSettings>
    <ODataSettings InitialContainerName=""></ODataSettings>
    </WebServiceSettings>
    </FilterMenu>
     
    <HeaderContextMenu CssClass="GridContextMenu GridContextMenu_Default">
    <WebServiceSettings>
    <ODataSettings InitialContainerName=""></ODataSettings>
    </WebServiceSettings>
    </HeaderContextMenu>
        </telerik:RadGrid>
    </asp:Content>

    I use custom pagination and NHibernate throughout my project.
    The property "EnableLinqExpressions" is False in all of my RadGrids. I have no problem at all with Q2 2011 SP1.
    Thank you for the help.

    UPDATE: If you set "AllowFilteringByColumn" to "False" you get no error.
  9. Radoslav
    Admin
    Radoslav avatar
    1564 posts

    Posted 08 Dec 2011 Link to this post

    Hello John,

    Indeed I verified the described issue exists in the current version of RadGrid. I forwarded it to our developers and they will start working on the resolution of this issue. Please excuse us for this temporary inconvenience. Additionally as a small token of gratitude for your involvement I have updated your Telerik points.

    I will be glad to assist you further.

    Best wishes,
    Radoslav
    the Telerik team
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now
  10. John Swenson
    John Swenson avatar
    23 posts
    Member since:
    Jan 2010

    Posted 09 Dec 2011 Link to this post

    Hello Radoslav,

    thank you for your help and for the Telerik points ;-)
    Please let me know when this problem gets fixed.
  11. Radoslav
    Admin
    Radoslav avatar
    1564 posts

    Posted 14 Dec 2011 Link to this post

    Hi John,

    Our developers fixed the described issue and the fix will be available in the next hotfix which will be available in the middle of the next week.
    On the following links you could find instructions how to use the hotfix dlls:
    http://www.telerik.com/help/aspnet-ajax/introduction-using-hotfix.html

    If you need further assistance, do not hesitate to contact us again.

    Regards,
    Radoslav
    the Telerik team
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now
  12. Curtis
    Curtis avatar
    23 posts
    Member since:
    Jan 2008

    Posted 14 Jun 2012 Link to this post

    Radoslav,

    I am having this exact same issue and just installed the latest release of the tools from June 11th, 2012 and this error still occurs.

    What is the resolution?

  13. Radoslav
    Admin
    Radoslav avatar
    1564 posts

    Posted 19 Jun 2012 Link to this post

    Hello Curtis,

    I tried to reproduce the described issue with the latest version of our controls (2012.2.607) but to no avail. I am sending you a simple example. Please check it out and let me know what differs in your case. Looking forward for your reply.

    Regards,
    Radoslav
    the Telerik team
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
  14. Top Coder
    Top Coder avatar
    18 posts
    Member since:
    May 2005

    Posted 14 Sep 2012 Link to this post

    I just installed the latest release 2012 09 

    Now my event logs are flooded with this error. 
  15. Radoslav
    Admin
    Radoslav avatar
    1564 posts

    Posted 19 Sep 2012 Link to this post

    Hello Henry ,

    I am sending you a simple example which uses the latest version of our controls (Q2 2012 SP2). Please check it out and let me know what differs in your case.

    Looking forward for your reply.

    Greetings,
    Radoslav
    the Telerik team
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
  16. Informat
    Informat avatar
    17 posts
    Member since:
    Oct 2008

    Posted 10 Dec 2012 Link to this post

    Dear,

    Also I am having constantly this error with the latest release of telerik.

    at System.Collections.Generic.Dictionary`2.get_Item(TKey key) at Telerik.Web.UI.RadButton.LoadPostData(String postDataKey, NameValueCollection postCollection) at Telerik.Web.UI.RadWebControl.System.Web.UI.IPostBackDataHandler.LoadPostData(String postDataKey, NameValueCollection postCollection) at System.Web.UI.Page.ProcessPostData(NameValueCollection postData, Boolean fBeforeLoad) at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)




    Any idea how this can resolved ?

    Regards,
    N.
  17. Radoslav
    Admin
    Radoslav avatar
    1564 posts

    Posted 12 Dec 2012 Link to this post

    Hello Nick,

    The described issue is very strange. We have not encountered it so far and we are not sure what could be the reason for experiencing the problem. Could you please post your aspx page markup with the related code behind or send us a small runnable example where the problem could be reproduced. Thus we will be able to get more information about your scenario and provide you more to the point answer.

    Looking forward for your reply.

    All the best,
    Radoslav
    the Telerik team
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
  18. Mehmet
    Mehmet avatar
    100 posts
    Member since:
    Jun 2014

    Posted 01 Apr 2015 Link to this post

    I am having the same issue with the excel export function with my radgrid.

    Could you please advise me?

    here is the radgrid :
    <telerik:RadGrid AutoGenerateColumns="False" ID="RadGrid4" AllowFilteringByColumn="True" AllowSorting="True" runat="server" OnItemCommand="RadGrid4_ItemCommand" OnItemCreated="RadGrid4_ItemCreated" EnableLinqExpressions="false" HtmlEncode="true" OnNeedDataSource="RadGrid4_NeedDataSource" GroupingSettings-RetainGroupFootersVisibility="true"
                            ShowGroupPanel="True" CellSpacing="-1" GridLines="Both" Skin="Office2010Silver" EnableViewState="true" Width="100%">
                            <PagerStyle Mode="NextPrevAndNumeric" />
                            <GroupingSettings CaseSensitive="false" />
                            <ClientSettings AllowKeyboardNavigation="true">
                            </ClientSettings>
                            <ExportSettings OpenInNewWindow="true" FileName="i-Dispatch Job Part Used Report" ExportOnlyData="true">
                                <Pdf PageHeight="210mm" PageWidth="297mm" DefaultFontFamily="Arial Unicode MS" PageTopMargin="45mm"
                                    BorderStyle="Medium" BorderColor="#666666" PaperSize="A4">
                                </Pdf>
                            </ExportSettings>
                            <MasterTableView Width="100%" DataKeyNames="JobID" HierarchyLoadMode="ServerOnDemand" ShowGroupFooter="true" AllowMultiColumnSorting="true">
                                <Columns>
                                    <telerik:GridMaskedColumn DataField="JobID" HeaderText="JobID#"
                                        FilterControlWidth="50px" AutoPostBackOnFilter="false" CurrentFilterFunction="EqualTo"
                                        FilterDelay="2000" ShowFilterIcon="false" Mask="#####" GroupByExpression="JobID Group By JobID">
                                        <ColumnValidationSettings>
                                            <ModelErrorMessage Text=""></ModelErrorMessage>
                                        </ColumnValidationSettings>
                                    </telerik:GridMaskedColumn>
                                    <telerik:GridBoundColumn DataField="JobTitle" FilterControlAltText="Filter JobTitle column" HeaderText="Job Title" SortExpression="JobTitle" UniqueName="JobTitle">
                                        <ColumnValidationSettings>
                                            <ModelErrorMessage Text="" />
                                        </ColumnValidationSettings>
                                    </telerik:GridBoundColumn>
                                    <telerik:GridDateTimeColumn DataField="JobBookedDate" PickerType="DatePicker" EnableTimeIndependentFiltering="true"
                                        DataFormatString="{0:dd/MM/yyyy HH:mm }" DataType="System.DateTime" FilterControlAltText="Filter JobBookedDate column" HeaderText="Job Booked Date" SortExpression="JobBookedDate" UniqueName="JobBookedDate">
                                        <ColumnValidationSettings>
                                            <ModelErrorMessage Text="" />
                                        </ColumnValidationSettings>
                                    </telerik:GridDateTimeColumn>
                                    <telerik:GridTemplateColumn DataField="AssignedStaffID" HeaderText="Mobile Staff" UniqueName="AssignedStaffID"
                                        HeaderStyle-Width="200px" SortExpression="AssignedStaffID">
                                        <FilterTemplate>
                                            <telerik:RadComboBox ID="comboStaff" DataTextField="StaffName"
                                                DataValueField="StaffID" Height="100px" AppendDataBoundItems="true" SelectedValue='<%# ((GridItem)Container).OwnerTableView.GetColumn("AssignedStaffID").CurrentFilterValue %>'
                                                runat="server" OnClientSelectedIndexChanged="StaffIndexChanged">
                                                <Items>
                                                    <telerik:RadComboBoxItem Text="All" />
                                                </Items>
                                            </telerik:RadComboBox>
                                            <telerik:RadScriptBlock ID="RadScriptBlock10" runat="server">
                                                <script type="text/javascript">
                                                    function StaffIndexChanged(sender, args) {
                                                        var tableView = $find("<%# ((GridItem)Container).OwnerTableView.ClientID %>");
                                                        tableView.filter("AssignedStaffID", args.get_item().get_value(), "EqualTo");
                                                    }
                                                </script>
                                            </telerik:RadScriptBlock>
                                        </FilterTemplate>
                                        <ItemTemplate>
                                            <%# Eval("Staff") %>
                                        </ItemTemplate>
                                    </telerik:GridTemplateColumn>
                                    <telerik:GridTemplateColumn DataField="CreatedBy" HeaderText="Added By" UniqueName="CreatedBy"
                                        HeaderStyle-Width="200px" SortExpression="CreatedBy">
                                        <FilterTemplate>
                                            <telerik:RadComboBox ID="comboAdded" DataTextField="StaffName"
                                                DataValueField="StaffID" Height="100px" AppendDataBoundItems="true" SelectedValue='<%# ((GridItem)Container).OwnerTableView.GetColumn("CreatedBy").CurrentFilterValue %>'
                                                runat="server" OnClientSelectedIndexChanged="AddedByIndexChanged">
                                                <Items>
                                                    <telerik:RadComboBoxItem Text="All" />
                                                </Items>
                                            </telerik:RadComboBox>
                                            <telerik:RadScriptBlock ID="RadScriptBlock11" runat="server">
                                                <script type="text/javascript">
                                                    function AddedByIndexChanged(sender, args) {
                                                        var tableView = $find("<%# ((GridItem)Container).OwnerTableView.ClientID %>");
                                                        tableView.filter("CreatedBy", args.get_item().get_value(), "EqualTo");
                                                    }
                                                </script>
                                            </telerik:RadScriptBlock>
                                        </FilterTemplate>
                                        <ItemTemplate>
                                            <%# Eval("AddedBy") %>
                                        </ItemTemplate>
                                    </telerik:GridTemplateColumn>
                                    <telerik:GridBoundColumn DataField="PartCode" FilterControlAltText="Filter PartCode column" HeaderText="Part Code" SortExpression="PartCode" UniqueName="PartCode">
                                        <ColumnValidationSettings>
                                            <ModelErrorMessage Text="" />
                                        </ColumnValidationSettings>
                                    </telerik:GridBoundColumn>
                                    <telerik:GridBoundColumn DataField="PartName" Aggregate="Count" FooterText="Total parts: " FilterControlAltText="Filter PartName column" HeaderText="Part Name" SortExpression="PartName" UniqueName="Part Name">
                                        <ColumnValidationSettings>
                                            <ModelErrorMessage Text="" />
                                        </ColumnValidationSettings>
                                    </telerik:GridBoundColumn>
     
                                    <telerik:GridNumericColumn DataFormatString="{0:$###,##0.00}" DataField="PartPurchasePrice" DataType="System.Double" NumericType="Currency"
                                        HeaderText="Purchase Price" SortExpression="PartPurchasePrice" UniqueName="PartPurchasePrice" Aggregate="Sum" FooterText="Total : " FooterAggregateFormatString="{0:C}">
                                        <FooterStyle Font-Bold="true"></FooterStyle>
                                    </telerik:GridNumericColumn>
                                    <telerik:GridNumericColumn DataFormatString="{0:$###,##0.00}" DataField="PartSalePrice" DataType="System.Double" NumericType="Currency"
                                        HeaderText="Recommended Sale Price" SortExpression="PartSalePrice" UniqueName="PartSalePrice" FooterText="Total: " Aggregate="Sum" FooterAggregateFormatString="{0:C}">
                                        <FooterStyle Font-Bold="true"></FooterStyle>
                                    </telerik:GridNumericColumn>
                                    <telerik:GridNumericColumn DataFormatString="{0:$###,##0.00}" DataField="JobPartUnitPrice" DataType="System.Double" NumericType="Currency"
                                        HeaderText="Sale Price Charged" SortExpression="JobPartUnitPrice" UniqueName="JobPartUnitPrice" Aggregate="Sum" FooterAggregateFormatString="{0:C}">
                                        <FooterStyle Font-Bold="true"></FooterStyle>
                                    </telerik:GridNumericColumn>
                                    <telerik:GridNumericColumn DataField="JobPartQuantity" DataType="System.Double"
                                        HeaderText="Quantity" SortExpression="JobPartQuantity" UniqueName="JobPartQuantity" Aggregate="Sum" FooterAggregateFormatString="{0:n}">
                                        <FooterStyle Font-Bold="true"></FooterStyle>
                                    </telerik:GridNumericColumn>
                                    <telerik:GridNumericColumn DataFormatString="{0:$###,##0.00}" DataField="JobPartGST" DataType="System.Double" NumericType="Currency"
                                        HeaderText="GST Charged" SortExpression="JobPartGST" UniqueName="JobPartGST" Aggregate="Sum" FooterAggregateFormatString="{0:C}">
                                        <FooterStyle Font-Bold="true"></FooterStyle>
                                    </telerik:GridNumericColumn>
                                    <telerik:GridNumericColumn DataFormatString="{0:$###,##0.00}" DataField="JobPartTotal" DataType="System.Double" NumericType="Currency"
                                        HeaderText="Total" SortExpression="JobPartTotal" UniqueName="JobPartTotal" Aggregate="Sum" FooterAggregateFormatString="{0:C}">
                                        <FooterStyle Font-Bold="true"></FooterStyle>
                                    </telerik:GridNumericColumn>
                                    <telerik:GridCalculatedColumn HeaderText="Gross Margin" UniqueName="GrossMargin" DataType="System.Double" DataFormatString="{0:$###,##0.00}"
                                        DataFields="JobPartUnitPrice, PartPurchasePrice" Expression="{0}-{1}" FooterText="Total : "
                                        Aggregate="Sum">
                                    </telerik:GridCalculatedColumn>
                                       <telerik:GridCalculatedColumn HeaderText="Gross Margin Percentage" UniqueName="GrossMarginPercentage" DataType="System.Double" DataFormatString="{0:P}"
                                        DataFields="JobPartUnitPrice, PartPurchasePrice" Expression="iif({0}=0,0,iif(({0}-{1})=0,0,(({0}-{1})/{0})*100))" FooterText="Total : "
                                        Aggregate="Sum">
                                    </telerik:GridCalculatedColumn>                               
                                </Columns>
                                <GroupByExpressions>
                                    <telerik:GridGroupByExpression>
                                        <GroupByFields>
                                            <telerik:GridGroupByField FieldName="JobID"></telerik:GridGroupByField>
                                        </GroupByFields>
                                        <SelectFields>
                                            <telerik:GridGroupByField FieldName="JobID" HeaderText="JobID#"></telerik:GridGroupByField>
                                        </SelectFields>
                                    </telerik:GridGroupByExpression>
                                </GroupByExpressions>
                            </MasterTableView>
                            <ClientSettings AllowDragToGroup="true">
                                <Scrolling AllowScroll="True" UseStaticHeaders="True" />
                            </ClientSettings>
                            <GroupingSettings ShowUnGroupButton="true"></GroupingSettings>
                        </telerik:RadGrid>
  19. Radoslav
    Admin
    Radoslav avatar
    1564 posts

    Posted 03 Apr 2015 Link to this post

    Hello Mehmet,

    I tried to reproduce the problem on my side but to no avail. I am sending you a simple example based on your code. Please check it out and let me know what differs in your case.

    Looking forward for your reply.

    Regards,
    Radoslav
    Telerik
     

    See What's Next in App Development. Register for TelerikNEXT.

     
Back to Top
UI for ASP.NET Ajax is Ready for VS 2017