The Syncfusion native Blazor components library offers 70+ UI and Data Viz web controls that are responsive and lightweight for building modern web apps.
.NET PDF framework is a high-performance and comprehensive library used to create, read, merge, split, secure, edit, view, and review PDF files in C#/VB.NET.
Is it possible to use an Enum as the value type for a cell? In particular, the cells I need this for are all comboboxes.
I put the name of my enum (TypeEnum) under CellValueType for the corresponding base style, which seemed to work OK, but when I use dataGrid[row,col].CellValue, it returns an object and throws an invalid cast message when I try (TypeEnum) dataGrid[row,col].CellValue
Where to, Gumshoe?
------
LSMFT
Actually, Jack meant "unable to convert" error, instead of just "bad cast". Probably same difference but hey.
Jack''s too cheap to post again, so I had to do it. He didn''t want to have to tip the computer (that''s a PCMCIA rack, not a coin slot!)
MCMartin CyrJuly 7, 2005 06:43 PM UTC
Check out System.Enum.GetNames. It returns an array of strings wich you can then use as DataSource.
MCMartin CyrJuly 7, 2005 06:47 PM UTC
I''m sorry, I misread your post, what you want in the situation might be more like System.Enum.Parse or .GetValues
Sorry
ADAdministrator Syncfusion Team July 7, 2005 10:12 PM UTC
Here is a sample using Enums in a combobox without this casting problem. You can also type the enum text into the cell as well. Do you need something different?
http://www.syncfusion.com/Support/user/uploads/GC_CustomObject_728fd939.zip