Hide Dropdown for Date column

Good day,
I have a grid linked to a DataTable with various field types.
By default some of these field types are displayed with a dropdown in the grid.
I have removed most of them with the following code:



However one column is linked to the DateTime fieldtype and it's Dropdown is displayed.
As this is a ReadOnly table how can I hide the dropdown for a DateTime column?




Regards,
James

3 Replies

AR Arulpriya Ramalingam Syncfusion Team January 24, 2018 06:32 AM UTC

Hi James,  
  
Thanks for contacting Syncfusion support.  
  
In order to avoid drop down container for the DateTime columns or any dropdown columns, the ShowButtons property can be set as Hide option. Already we have provided a KB to achieve this scenario. Please make use of the below code and KB link,  
  
Code example  
  
this.gridGroupingControl1.TableDescriptor.Columns["Column_Name"].Appearance.AnyRecordFieldCell.CellValueType = typeof(DateTime);  
//To hide the cell buttons     
this.gridGroupingControl1.TableDescriptor.Columns["Column_Name"].Appearance.AnyRecordFieldCell.ShowButtons = GridShowButtons.Hide;  
  
  
Regards,  
Arulpriya 



JR James Roodt January 24, 2018 06:45 AM UTC

Hi Arulpriya,

This is exactly what I was looking for. And thank you for the prompt response!

Regards,
James


AR Arulpriya Ramalingam Syncfusion Team January 25, 2018 04:05 AM UTC

Hi James, 
 
Thanks for your update. 

We are glad to hear that the provided solution was resolved your scenario.   
 
Please let us know, if you have any other queries. 
 
Regards, 
Arulpriya 


Loader.
Up arrow icon