We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy.
Unfortunately, activation email could not send to your email. Please try again.

change the mouse pointer to hand icon

Thread ID:

Created:

Updated:

Platform:

Replies:

129844 Apr 6,2017 12:50 AM Apr 10,2017 08:42 AM UWP 4
loading
Tags: SfDataGrid
MURALI KRISHNA
Asked On April 6, 2017 12:50 AM

Hello,  I am using a sfgrid to show some data, I want to change the mouse pointer to hand symbol(like hyperlink) to tell the user that the row/column is clickable.. Please give me solution for this. Thanks In advance


Balamurugan Rajaraman [Syncfusion]
Replied On April 7, 2017 01:28 PM

Hi Murali 
 
We have analyzed your query “How to change the move cursor Symbol while hover on the SfDataGrid”. You can able to achieve your requirement by using the PointerMoved event as like the below provided code sample. 
 
public MainPage() 
        { 
            this.InitializeComponent(); 
            this.PointerMoved += MainPage_PointerMoved; 
        } 
         
        private void MainPage_PointerMoved(object sender, PointerRoutedEventArgs e) 
        { 
            var point = e.GetCurrentPoint(this.dataGrid); 
            var p = this.dataGrid.GetVisualContainer().ScrollOwner.TransformToVisual(dataGrid).TransformPoint(point.Position); 
            var isInDataGrid = this.dataGrid.GetVisualContainer().PointToCellRowColumnIndex(p, false); 
            if (isInDataGrid.IsEmpty) 
            { 
                Window.Current.CoreWindow.PointerCursor = new Windows.UI.Core.CoreCursor(Windows.UI.Core.CoreCursorType.Arrow, 0); 
            } 
            else 
                Window.Current.CoreWindow.PointerCursor = new Windows.UI.Core.CoreCursor(Windows.UI.Core.CoreCursorType.Hand, 0); 
        } 
 
 We have created the sample as per the requirement and attached that sample for your reference you can download it from the below location. 
 
Sample:  
 
Regards, 
Balamurugan R 


Balamurugan Rajaraman [Syncfusion]
Replied On April 7, 2017 01:41 PM

Hi Murali 
 
Please ignore our previous update. 
 
We have analyzed your query “How to change the move cursor Symbol while hover on the SfDataGrid”. You can able to achieve your requirement by using the PointerMoved event as like the below provided code sample. 
 
public MainPage() 
        { 
            this.InitializeComponent(); 
            this.PointerMoved += MainPage_PointerMoved; 
        } 
         
        private void MainPage_PointerMoved(object sender, PointerRoutedEventArgs e) 
        { 
            var point = e.GetCurrentPoint(this.dataGrid); 
            var p = this.dataGrid.GetVisualContainer().ScrollOwner.TransformToVisual(dataGrid).TransformPoint(point.Position); 
            var isInDataGrid = this.dataGrid.GetVisualContainer().PointToCellRowColumnIndex(p, false); 
            if (isInDataGrid.IsEmpty) 
            { 
                Window.Current.CoreWindow.PointerCursor = new Windows.UI.Core.CoreCursor(Windows.UI.Core.CoreCursorType.Arrow, 0); 
            } 
            else 
                Window.Current.CoreWindow.PointerCursor = new Windows.UI.Core.CoreCursor(Windows.UI.Core.CoreCursorType.Hand, 0); 
        } 
 
 We have created the sample as per the requirement and attached that sample for your reference you can download it from the below location. 
 
Sample: http://www.syncfusion.com/downloads/support/directtrac/general/ze/1298441586638471.zip 
 
Regards, 
Balamurugan R 


MURALI KRISHNA
Replied On April 8, 2017 07:58 AM

Thanks for your reply Balamurugan.

Prasanth Saravanan [Syncfusion]
Replied On April 10, 2017 08:42 AM

Hi Murali, 
  
Thanks for your update. 
Please let us know if you need further assistance. 
  
Regards, 
 Prasanth.S

CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.

;