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

SfDataGrid column hide/unhide

Thread ID:

Created:

Updated:

Platform:

Replies:

126129 Sep 26,2016 08:38 AM Nov 3,2016 12:03 AM Xamarin.iOS 4
loading
Tags: SfDataGrid
Paolo Mantovani
Asked On September 26, 2016 08:38 AM

Hi,
I need to hide/unhide columns dynamically in a SfDataGrid, depending on the user tap on a button. The GridColumn class does not seem to have the IsHidden property in Xamarin.iOS, so I change Width to zero for hiding and back to the original value for unhiding.

However when the cells are unhidden, they do not keep their properties, for example background colour. I call SetNeedsLayout() against the grid to make sure the LayoutSubviews() method of the cells is called, and the background colour property is actually set there, but the colour is white on the screen and my colour is ignored. Another property that is not consistent is HeaderBackgroundColour: I set it at grid level (GridStyle), but after unhide is reverted to white.

Does anyone know if this is a known problem or I am missing something?

Thanks
Paolo

Divakar Subramaniam [Syncfusion]
Replied On September 27, 2016 05:58 AM

Hi Paolo, 
 
Thanks for contacting Syncfusion Support. 
 
We have checked your query and we were not able to reproduce the reported issues in 14.3.0.32 version of assemblies. Could you please confirm us, in which version of assemblies the issues were reproduced? 
 
We have prepared a sample based on your queries and the background color is maintained properly after unhidden the column. You can download the sample from the below link for your reference. 
 
If you still facing the issues, please do revert us with modified sample reproducing the issues which will help us proceed further. 
 
Regards, 
Divakar. 


Paolo Mantovani
Replied On September 27, 2016 08:46 AM

Hi,
thank you for the reply. I need certain columns to be initially hidden, I reproduced the issue in your code in this way:
in MyViewController constructor

            sfgrid.AutoGeneratingColumn += (sender, e) => 
            {
                if (e.Column.MappingName == "Freight")
                {
                    e.Column.UserCellType = typeof(GridCellExt);
                    e.Column.Width = 0;
                }
            }
;

In my app the columns are not auto generated but it does not seem to make any difference
Thanks
Paolo


Ashok N [Syncfusion]
Replied On September 28, 2016 01:57 PM

Hi Paolo, 

Thanks for your reply. 

We are able to reproduce the “Unhidden column did not keep their properties” issue. We have logged a defect report on this and this fix will be available in our upcoming 2016 Vol 3-SP1 release, which will be rolling out on End of October, 2016. We will update you once release is rolled out.  

Regards, 
Ashok 


Ashok N [Syncfusion]
Replied On November 3, 2016 12:03 AM

Hi Paolo,  
 
We are glad to announce that our Essential Studio Volume 3 SP 1, 2016 (Version 14.3.0.52) is rolled out which includes the fix for the reported issue “Unhidden column did not keep their properties” and is available for download under the following link.  
 
                                               
We thank you for your support and appreciate your patience in waiting for this release. Please get in touch with us if you would require any further assistance.  
 
Regards,  
Ashok  


CONFIRMATION

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.

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.

;