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
close icon

Custom column headers and tab index visibility

Hi

I would like to be able to change the column header IDs from the standard "A", "B", "C" etc to the text in the image displayed below.


Also, is there a way to hide the tab index bar at the bottom of a spreadsheet control?

3 Replies

AA Arulraj A Syncfusion Team January 3, 2019 10:39 AM UTC

Hi Jonathan, 

Thanks for using Syncfusion product. 

Query 
Response 
 Would like to be able to change the column header IDs from the standard "A", "B", "C" etc to the text in the image displayed below. 
By default, SfSpreadSheet control does not have the support to change the default Columns/Rows header text. But, you could achieve your required scenario by hiding the Row/Column headers using SetRowColumnHeadersVisibility method. Please refer the following code example. 

C# 
this.spreadsheetControl.SetRowColumnHeadersVisibility(false); 
 
Please refer the following UG link, 
is there a way to hide the tab index bar at the bottom of a spreadsheet control? 
To hide the tabbar in spreadsheet control, you could implement the custom SfSpreadsheet control and override the OnApplyTemplate method to make the changes in TabControlExt. Please refer the following code example and the sample. 

C# 
public class CustomSfSpreadSheet : SfSpreadsheet 
{ 
    public CustomSfSpreadSheet() 
    { } 
 
    public override void OnApplyTemplate() 
    { 
        base.OnApplyTemplate(); 
        try 
        { 
            var child = this.GetVisualChild(0); 
            var grid = child as Grid; 
            if (grid != null) 
            { 
                var childGrid = grid.Children[2] as Grid; 
                if (childGrid != null) 
                { 
                    var tabControl = childGrid.Children[2] as TabControlExt; 
                    if (tabControl != null) 
                    { 
                             
                        tabControl.Loaded += TabControl_Loaded; 
                    } 
                } 
            } 
        } 
        catch (Exception ex) 
        { 
 
        } 
    } 
 
    private void TabControl_Loaded(object sender, RoutedEventArgs e) 
    { 
        var tabControl = sender as TabControlExt; 
        HeaderPanel panel = VisualUtils.FindDescendant(tabControl, typeof(HeaderPanel)) as HeaderPanel; 
        if (panel != null) 
        { 
            panel.Visibility = Visibility.Collapsed; 
        } 
    } 
} 


Regards, 
Arulraj A 



JO Jonathan January 3, 2019 10:53 AM UTC

Thanks. I was directed through another communication channel by one of the support staff to the GridControl as a better means of accomplishing what I want. Sorted :) .


AA Arulraj A Syncfusion Team January 3, 2019 11:32 AM UTC

Hi Jonathan, 

Thanks for the update. 

We are glad to know that the reported problem has been resolved at your end. Please let us know if you have any further queries on this. We are happy to help you. 

Regards, 
Arulraj A 


Loader.
Live Chat Icon For mobile
Up arrow icon