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

Find visible columns

Hello, can anyone tell me how I can find the first visible columns in a SfDataGrid?


3 Replies

BR Balamurugan Rajaraman Syncfusion Team March 2, 2017 09:53 AM UTC

Hi Cliffe, 
Thank you for contact Syncfusion support, 
We have analyzed your query. You can achieve your requirement “Find Visible Column” by using ScrollLineIndex of ScrollColumns as like below, 
//here we get the details of the first visible columns 
var firstVisibleColumn = this.datagrid.GetVisualContainer().ScrollColumns.ScrollLineIndex; 
var FirstVisibleColumIndex = this.datagrid.ResolveToGridVisibleColumnIndex(firstVisibleColumn); 
 var column = this.datagrid.Columns[FirstVisibleColumIndex]; 
We have prepared the sample based on your requirement you can download it from the below location, 

CH Cliffe Hodgkinson March 3, 2017 12:00 PM UTC

That worked great - thank you very much!


BR Balamurugan Rajaraman Syncfusion Team March 6, 2017 08:39 AM UTC

Hi Cliffe 
Thanks for the update. 
Let us know if you have any further assistance on this. 

Live Chat Icon For mobile
Up arrow icon