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.

Grid cell selection/tap

Thread ID:

Created:

Updated:

Platform:

Replies:

127580 Nov 24,2016 03:34 PM Nov 24,2016 11:58 PM Xamarin.iOS 1
loading
Tags: SfDataGrid
Joseph Hanna
Asked On November 24, 2016 03:34 PM

Hi guys,

Is there a way to achieve cell selection/tap event on a grid in Xamarin.iOS? I have a grid with several columns and I want to know specifically which cell (column in a particular row) the user tapped on so I can react accordingly. eg. tapping on the quantity column in a row to popup a quantity change dialog and tapping on the price column in a row to popup a price change dialog.

Thanks
Joe

Ashok N [Syncfusion]
Replied On November 24, 2016 11:58 PM

Hi Joe, 

Thanks for contacting Syncfusion support. 

We have checked your query and you can get the Grid RowColumnIndex by handling the below events. You can get the particular cell using this RowColumnIndex , 

sfGrid.GridTapped += SfGrid_GridTapped; 
sfGrid.GridDoubleTapped += SfGrid_GridDoubleTapped; 
sfGrid.GridLongPressed += SfGrid_GridLongPressed; 
 
private void SfGrid_GridLongPressed(object sender, GridLongPressedEventsArgs e) 
{ 
    int rowindex = e.RowColumnindex.RowIndex; 
    int columnindex = e.RowColumnindex.ColumnIndex; 
} 
 
private void SfGrid_GridDoubleTapped(object sender, GridDoubleTappedEventsArgs e) 
{ 
    int rowindex = e.RowColumnindex.RowIndex; 
    int columnindex = e.RowColumnindex.ColumnIndex; 
} 
 
private void SfGrid_GridTapped(object sender, GridTappedEventsArgs e) 
{ 
    int rowindex = e.RowColumnindex.RowIndex; 
    int columnindex = e.RowColumnindex.ColumnIndex; 
} 

Regards, 
Ashok 
0

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.

;