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. (Last updated on : Nov 16th 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

DataGrid_SelectionChange

Thread ID:

Created:

Updated:

Platform:

Replies:

125502 Aug 20,2016 05:30 PM UTC Aug 22,2016 07:25 AM UTC Xamarin.Android 1
loading
Tags: SfDataGrid
Miguel Arenas
Asked On August 20, 2016 05:30 PM UTC

Hi, how can I get the column name of the rowselected?

Divakar Subramaniam [Syncfusion]
Replied On August 22, 2016 07:25 AM UTC

Hi Miguel,   
   
Thank you for contacting Syncfusion Support.   
   
We have checked your query. You can get the column name of the cell you have selected by handling the SfDataGrid.GridTapped event. You can get the column index through GridTappedEventsArgs and by using the column index you can get the column name. Please refer the below code example.   
 
   
private int columnIndex;   
private string columnName;   
   
dataGrid.GridTapped += dataGrid_GridTapped;   
   
// Handling GripTapped event   
private void dataGrid_GridTapped(object sender, GridTappedEventsArgs e)   
{   
    columnIndex = this.DataGrid.ResolveToGridVisibleColumnIndex (e.RowColumnindex.ColumnIndex);   
    columnName = this.dataGrid.Columns[columnIndex].MappingName;   
}   
  
   
  
   
We have prepared a sample based on your requirement and you can download the same from the below link.   
 
 
Regards, 
Divakar. 


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.

Warning Icon 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.Close Icon

;