PivotGrid MouseEventArgs

4 posts, 0 answers
  1. Keith
    Keith avatar
    3 posts
    Member since:
    Jun 2014

    Posted 06 Aug 2014 Link to this post

    What "using" directive must  required to use Mousedoubleclick
    on a RadPivotGrid? 

    I keep getting the following error:
    Error 17 The type or namespace name 'MouseEventArgs' could not be found (are you missing a using directive or an assembly reference?) \\jt3netapp1-2\users\Keith.Love\Visual Studio 2010\Projects\Telerik_WebApplication1\Telerik_WebApplication1\BigSheet2014Telerik.aspx.cs 748 68 Telerik_WebApplication1

    and I have the following directives in my code:
    using System;
    using System.Globalization;
    using System.Collections.Generic;
    using System.Linq;
    using System.Web;
    using System.Web.Services;
    using System.Web.UI;
    using System.Web.UI.WebControls;
    using System.Data;
    using Telerik.Web.UI;
    using Telerik.Web.UI.PivotGrid;
    using System.Text;
  2. Angel Petrov
    Admin
    Angel Petrov avatar
    1007 posts

    Posted 08 Aug 2014 Link to this post

    Hello,

    I am experiencing difficulties understanding the scenario. The pivot controls does not have a mouse event that requires a directive to be included. Could you please share with us the markup and code-behind of the page so we could examine the implementation?

    Regards,
    Angel Petrov
    Telerik
     

    Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

     
  3. UI for ASP.NET MVC is VS 2017 Ready
  4. Keith
    Keith avatar
    3 posts
    Member since:
    Jun 2014

    Posted 11 Aug 2014 in reply to Angel Petrov Link to this post

    CodeBehind:
    private void radPivotGrid1_MouseDoubleClick(object sender, MouseEventArgs e)
    {

    PivotCellElement currentCell = radPivotGrid1.PivotGridElement.ElementTree.GetElementAtPoint(e.Location) as PivotCellElement;

    if (currentCell != null)
    {

    var cellValue = currentCell.Value;

    var column = currentCell.Column.Name;

    var row = currentCell.Row.Name;

    }
    }

    Snippet from aspx page:
    <telerik:RadPivotGrid ID="RadPivotGrid1" runat="server"
    ResolvedRenderMode="Classic" OnCellCreated = "RadPivotGrid1_CellCreated"
    OnCellDataBound = "RadPivotGrid1_CellDataBound" ViewStateMode="Enabled" >

    <PagerStyle ChangePageSizeButtonToolTip="Change Page Size" PageSizeControlType="RadComboBox">
    </PagerStyle>




    <Fields>

    <telerik:PivotGridRowField DataField="ANNEX_ID" UniqueName="column2">
    </telerik:PivotGridRowField>

    <telerik:PivotGridRowField DataField="CLIN_ID" UniqueName="column1">
    </telerik:PivotGridRowField>

    <telerik:PivotGridColumnField DataField="FY_CODE" UniqueName="column">
    </telerik:PivotGridColumnField>

    <telerik:PivotGridColumnField DataField="MOD" UniqueName="column4"
    SortOrder="Descending">
    </telerik:PivotGridColumnField>
    <telerik:PivotGridAggregateField
    DataField="FUNDING_AMOUNT" GrandTotalAggregateFormatString="" DataFormatString="{0:c}"
    UniqueName="column5" CalculationExpression="" ZoneIndex="3">



    <TotalFormat Level="0" Axis="Rows" TotalFunction="NoCalculation" SortOrder="Ascending"></TotalFormat>



    </telerik:PivotGridAggregateField>
    </Fields>
  5. Angel Petrov
    Admin
    Angel Petrov avatar
    1007 posts

    Posted 13 Aug 2014 Link to this post

    Hi Keith,

    The markup provided seems related to the RadPivotGrid for ASP.NET AJAX but the server-side code does not. The AJAX grid does not have a server-side MouseDoubleClick event and PivotGridElement property. Could you please ensure that the page does not mix the ASPX.NET AJAX pivot with the WinForms one? Additionally if you are using the second I want to kindly ask you to post your question in the appropriate forum section

    Regards,
    Angel Petrov
    Telerik
     

    Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

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