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

How not to insert in the Column ChooserWindow the columns that are hidden ?

Thread ID:

Created:

Updated:

Platform:

Replies:

121690 Jan 16,2016 06:21 PM UTC Jan 6,2017 12:02 AM UTC WPF 7
loading
Tags: SfDataGrid
Silvio
Asked On January 16, 2016 06:21 PM UTC

Hi,

I have a datagrid that is first displayed with some hidden columns.
These columns are hidden according to some business calculation made before the grid is loaded and, we can say, they don't exist for the user.
So I would like the user can't see them in any way.
Unfortunately when the user shows the column ChooserWindow to configure what columns to show in his grid, also the initial hidden columns appear in the list on the form.
Is there any way not to insert these hidden columns in the list that appears in this form ?

Thank you in advance.

Silvio

Sowndaiyan Paulpandi [Syncfusion]
Replied On January 18, 2016 01:53 PM UTC

Hi Silvio,

Thanks for contacting Syncfusion Support.

We have analyzed your query. In SfDataGrid, default ColumnChooser will be working based on hidden columns. So could you please share more details about your exact requirement of ColumnChooser on your application? It will be helpful for us to analyze further. 


Regards,

Sowndaiyan


Silvio
Replied On January 18, 2016 04:11 PM UTC

I explain you better.

Is there any event on ChooserWindow that I can join to, where I could change the current columns contained in it?
I understand that by default this form shows all the current hidden columns of the datagrid.
But in this case I would like to exclude some columns from this form even if the are hidden
In practice, I don't want the user see them any way because, in some cases, it should be an error for him to be able to show them.
So, have you understood my question?
I would need a way to exclude some columns from this form even if they are hidden.

Sowndaiyan Paulpandi [Syncfusion]
Replied On January 19, 2016 12:32 PM UTC

Hi Silvio,

In SfDataGrid ColumnChooser, we do not have the direct support to achieve your requirement. But you can achieve this by customizing the ColumnChooser in sample level. We have prepared a sample as per your requirement and you can download the same from the below location. In this sample we have created the Customized ColumnChooser class “
ColumnChooserExt” and OnApplyTemplate method  and added the hidden columns in ColumnChooser where you can modify this as per your requirement to include or exclude the columns.

Sample : http://www.syncfusion.com/downloads/support/forum/121690/ze/ColumnChooserDemo1229417084



Regards,

Sowndaiyan


Silvio
Replied On January 3, 2017 03:10 PM UTC

Hi,

I have upgraded today to the new Syncfusion version and this example does not work yet.
If a drag a column from the grid to the column chooser window, it appear a red mouse cursor icon and I cannot yet move columns on it in order to hide them.
Have you any idea what can I do to solve this bug?
Thank you.

Silvio

Jai Ganesh S [Syncfusion]
Replied On January 5, 2017 12:57 PM UTC

Hi Silvio, 
Sorry for the delay. We have modified the sample based on our source and please find the sample from the below location, 
public virtual Rect GetControlRect() 
        { 
            var point = this.TranslatePoint(new Point(0, 0), this.DataGrid); 
 
            var rect = new Rect(point.X, point.Y, this.ActualWidth, this.ActualHeight); 
            return rect; 
 
        } 
 
Regards, 
Jai Ganesh S 


Silvio
Replied On January 5, 2017 02:40 PM UTC

Thank you Ganesh, perfect now !

Jai Ganesh S [Syncfusion]
Replied On January 6, 2017 12:02 AM UTC

Hi Silvio,  
Thank you for the update. 
Please let us know if you need further assistance on this. 
Regards, 
Jai Ganesh S 


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.

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

;