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

Hide Columns in Grid

Thread ID:





132132 Aug 16,2017 12:49 AM UTC Aug 16,2017 03:40 PM UTC UWP 1
Tags: SfDataGrid
Fritz Switzer
Asked On August 16, 2017 12:49 AM UTC

Cannot hide the Grid columns using Remove or RemoveAt.  or using the Visible property

Below is my code. 

            private ObservableCollection<Patient> patientCollection = new ObservableCollection<Patient>();

            int recCtr = 0;
            var root = Windows.Storage.ApplicationData.Current.LocalFolder.Path;
            using (var db = new SQLite.SQLiteConnection(dbPath))
                    var list = db.Table<Patient>().ToList();
                    foreach (var item in list)
                        /// Full Patient Table fields displayed
                        patCollection.Add(new Patient() { FirstName = item.FirstName, LastName = item.LastName, Address1 = item.Address1, City = item.City, State = item.State, PostCode = item.PostCode, BirthDate = item.BirthDate });
                catch { }

            int colCtr = PatientGrid.Columns.Count;

            PatientGrid.ItemsSource = patCollection;

Gnanasownthari Thirugnanam [Syncfusion]
Replied On August 16, 2017 03:40 PM UTC

Hi Fritz, 

We have checked your query “Cannot hide the Grid columns using Remove or RemoveAt or using the Visible property”. You can able to hide the particular column in SfDataGrid by setting GridColumn.IsHidden property as true as like the below code sample.  

this.dataGrid.Columns[0].IsHidden = true; 

Please refer the below UG link for getting more information about the IsHidden property: 

Sample location: 

Gnanasownthari T. 


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