By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
443,333 Members | 1,070 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 443,333 IT Pros & Developers. It's quick & easy.

Dataset: enum types

P: n/a
I would like to limit a field in my datagrid to only accept values in an enum that I have (gDataTypes).

To add my column I use:
columns.Add("Type", System.Type.GetType("System.String"))

Instead of System.String I would like to put in "gTableTypes", I have tried this with both "gTableTypes" and the full namespace but it does not wor. Is there anyway I can have the user select which enum value they want the field to be?
Nov 20 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
Jeremy,

This works for me
\\\
Dim mytype As String = "System.DateTime"
dt.Columns.Add("mycolumn", System.Type.GetType(mytype))
///

I hope this helps?

Cor
Nov 20 '05 #2

P: n/a
But what if it's an enum? "Misys.Globals.gDataTable" does not work, nor does "System.Enum"

Jeremy

"Cor Ligthert" wrote:
Jeremy,

This works for me
\\\
Dim mytype As String = "System.DateTime"
dt.Columns.Add("mycolumn", System.Type.GetType(mytype))
///

I hope this helps?

Cor

Nov 20 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.