|
Query |
Response | ||
|
How to get Field name from Column Index No. ?
|
You can get the field name of the column by using the SfDataGrid.Columns collection and resolve the column index based on View by using ResolveToGridVisibleColumnIndex method. Please refer the below code example,
Code Example
| ||
|
How to get current column's index no. ?
|
You can get the current column index by using SfDataGrid.CurrentCell.ColumnIndex, please refer the below code example
Code Example
| ||
|
How to exclude columns for exporting to pdf/excel when the said columns was hidden in sfdatagrid ?
|
Export To PDF
You can exclude the hidden columns when export the SfDataGrid to Pdf document by adding the columns in PdfExportingOptions.ExcludeColumns collection, please refer the below code and UG link
Code Example
UG Link : https://help.syncfusion.com/windowsforms/sfdatagrid/exporttopdf#exclude-columns-while-exporting
Export To Excel
You can exclude the hidden columns when export the SfDataGrid to excel document by adding the columns in ExcelExportingOptions.ExcludeColumns collection, please refer the below code and UG link
Code Example
UG Link : https://help.syncfusion.com/windowsforms/sfdatagrid/exporttoexcel#exclude-columns-while-exporting
|