This is a migrated thread and some comments may be shown as answers.

PivotGrid MouseEventArgs

3 Answers 90 Views
PivotGrid
This is a migrated thread and some comments may be shown as answers.
Keith
Top achievements
Rank 1
Keith asked on 06 Aug 2014, 11:56 PM
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;

3 Answers, 1 is accepted

Sort by
0
Angel Petrov
Telerik team
answered on 08 Aug 2014, 08:31 AM
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.

 
0
Keith
Top achievements
Rank 1
answered on 11 Aug 2014, 07:16 PM
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>
0
Angel Petrov
Telerik team
answered on 13 Aug 2014, 10:12 AM
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.

 
Tags
PivotGrid
Asked by
Keith
Top achievements
Rank 1
Answers by
Angel Petrov
Telerik team
Keith
Top achievements
Rank 1
Share this question
or