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

GGC and FieldChooser - column Read Only

Hi
Is it possible to use modifications  a plug-in utility called Field Chooser, which will help customize the view of a GridGroupingControl based on column Read Only

5 Replies

PM Piruthiviraj Malaimelraj Syncfusion Team May 29, 2017 09:32 AM UTC

Hi Gregory, 

Thanks for your interest in Syncfusion products. 

We have analyzed your scenario and created the simple sample with FieldChooser from what we had understood from your scenario. In that sample, the field chooser dialog has been prevented from opening for read only columns in FieldChooserShowing event. Can you please provide us with some more details of your scenario and let us know your requirement(with field chooser and read only columns) clearly? Please refer to the attached sample. 
 
Code example: 
this.gridGroupingControl1.TableDescriptor.Columns["Description"].ReadOnly = true; 
FieldChooser fieldChooser = new FieldChooser(this.gridGroupingControl1); 
 
this.gridGroupingControl1.FieldChooserShowing += gridGroupingControl1_FieldChooserShowing; 
 
void gridGroupingControl1_FieldChooserShowing(object sender, Syncfusion.Windows.Forms.Grid.FieldChooserShowingEventArgs e) 
{ 
    int row, col; 
    this.gridGroupingControl1.TableControl.PointToRowCol(point, out row, out col); 
    GridControl control = e.FieldList as GridControl; 
 
    if (this.gridGroupingControl1.TableDescriptor.Columns[col - 1].ReadOnly) 
    { 
        e.Cancel = true; 
    } 
} 

UG Document: 

Sample link: 

Regards, 
Piruthiviraj 



GP Gregory Pe replied to Piruthiviraj Malaimelraj May 29, 2017 09:55 AM UTC

Hi Gregory, 

Thanks for your interest in Syncfusion products. 

We have analyzed your scenario and created the simple sample with FieldChooser from what we had understood from your scenario. In that sample, the field chooser dialog has been prevented from opening for read only columns in FieldChooserShowing event. Can you please provide us with some more details of your scenario and let us know your requirement(with field chooser and read only columns) clearly? Please refer to the attached sample. 
 
Code example: 
this.gridGroupingControl1.TableDescriptor.Columns["Description"].ReadOnly = true; 
FieldChooser fieldChooser = new FieldChooser(this.gridGroupingControl1); 
 
this.gridGroupingControl1.FieldChooserShowing += gridGroupingControl1_FieldChooserShowing; 
 
void gridGroupingControl1_FieldChooserShowing(object sender, Syncfusion.Windows.Forms.Grid.FieldChooserShowingEventArgs e) 
{ 
    int row, col; 
    this.gridGroupingControl1.TableControl.PointToRowCol(point, out row, out col); 
    GridControl control = e.FieldList as GridControl; 
 
    if (this.gridGroupingControl1.TableDescriptor.Columns[col - 1].ReadOnly) 
    { 
        e.Cancel = true; 
    } 
} 

UG Document: 

Sample link: 

Regards, 
Piruthiviraj 


Hi Piruthiviraj

 using FieldChooser to change column status
  Read Only.
Read Only = true
Check boxes
Read Only = false

Regards,
Gregory



PM Piruthiviraj Malaimelraj Syncfusion Team May 30, 2017 03:11 PM UTC

Hi Gregory, 

Thanks for your update. 

We have analyzed your scenario. The FieldChooser is used to add/remove the columns in view of grid control , so  the FieldChooser does not have support for customizing as per your requirement. You can use own context menu to customize the column status. Please refer to the below KB for further references, 

KB link: 

Regards, 
Piruthiviraj 



DA Davy May 6, 2018 12:20 PM UTC

I have another question aboud the field chooser:

How can i activate the fieldchooser for child and grandchild tables?



AR Arulpriya Ramalingam Syncfusion Team May 9, 2018 01:17 PM UTC

Hi Davy,

 
Thanks for the update. 
 
We have analyzed the reported scenario at our end. As per our current support, the GridGroupingcontrol does not has the FieldChooser support for nested tables. So, we have added it to our feature request list and created a feature report. This will be included in any of our upcoming releases. 
 
Please let us know, if you have any concerns. 
 
Regards,
Arulpriya
 


Loader.
Up arrow icon