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. Image for the cookie policy date

Grid cell selection/tap

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

1 Reply

AN Ashok N Syncfusion Team November 25, 2016 04:58 AM UTC

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

Loader.
Live Chat Icon For mobile
Up arrow icon