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
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Columns.Count property only reflects column with data in.

Thread ID:





142171 Jan 23,2019 01:43 AM UTC Jan 23,2019 05:45 AM UTC WinForms 1
Tags: Spreadsheet
Asked On January 23, 2019 01:43 AM UTC

After opening a spreadsheet and checking the columns count property - it only reflected the last column which actually had data in.

Despite the fact that many additional columns where visible ie. ABCDEFGHIJK... etc.   if no data had been populated yet the columns.count only showed a value of 1.

Is this correct ? and does this mean in order to manipulate columns/cells on a clean spreadsheet I need to insert the additional columns before I can use them.   How do I tell what are actual columns as against what are being shown in the spreadsheet.

Arulraj A [Syncfusion]
Replied On January 23, 2019 05:45 AM UTC

Hi Spotty, 

Thanks for using Syncfusion product. 

To get the visible columns count in Spreadsheet, you could use the ActiveGrid.ColumnCount property. Please refer the following code example. 

'Column count 
Dim colCount As Integer = Me.spreadsheet.ActiveGrid.ColumnCount 
'Row count 
Dim rowCount As Integer = Me.spreadsheet.ActiveGrid.RowCount 
Please get back to us if you require further assistance from us.   
Arulraj A 


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.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

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

Live Chat Icon For mobile
Live Chat Icon