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.

How to set FieldType as ENUM?

Thread ID:

Created:

Updated:

Platform:

Replies:

122099 Feb 17,2016 03:21 AM Feb 18,2016 05:55 AM Windows Forms 2
loading
Tags: GridGroupingControl
yanghao
Asked On February 17, 2016 03:21 AM

I have set the datasouce, and one columntype is enum, but it doesn't work? How to resolve it?

yanghao
Replied On February 17, 2016 06:43 PM

I have set the datatable columntype as enum as follows:

private DataTable dtTitle = new DataTable();
gridTitle.DataSource = dtTitle;      
dtTitle.Columns.Add("Visible", typeof(bool));    
dtTitle.Columns.Add("Position", typeof(Position));   //Position is ENUM
dtTitle.Columns.Add("Content", typeof(string));       
dtTitle.Columns.Add("Color", typeof(Color));           
dtTitle.Columns.Add("Font", typeof(Font));      
dtTitle.Columns.Add("Margin", typeof(Padding));   

#region Control Position
[TypeConverter(typeof(ExpandableObjectConverter))]               
public enum Position : byte 
{
Top = 0,
Bottom = 1,
Left = 2,
Right = 3
}

But the GGC shows as attachfile, how to set it? Thank you!


Attachment: GGC_3a38e60f.rar

Pavithra Kodiyarasan [Syncfusion]
Replied On February 18, 2016 05:55 AM

Hi Yanghao,

Thanks for contacting syncfusion support.

By analyzing your given image and problem we thought that you set PropertyGrid to all columns DropDown cells. That’s why the enum columntype was not working. Please refer the following sample.

Sample:
http://www.syncfusion.com/downloads/support/forum/122099/ze/WindowsFormsApplication1193865938


If your requirement is different from this, Please let us know with clear explanation.

Regards,
Pavithra K.

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.

;