PC Review


Reply
Thread Tools Rate Thread

Dataset: enum types

 
 
=?Utf-8?B?SmVyZW15?=
Guest
Posts: n/a
 
      19th Jul 2004
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?
 
Reply With Quote
 
 
 
 
Cor Ligthert
Guest
Posts: n/a
 
      20th Jul 2004
Jeremy,

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

I hope this helps?

Cor


 
Reply With Quote
 
=?Utf-8?B?SmVyZW15?=
Guest
Posts: n/a
 
      20th Jul 2004
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
>
>
>

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Enums and types, does the enum really take the type? SpotNet Microsoft C# .NET 2 1st Jan 2007 09:53 PM
enum types Pohihihi Microsoft C# .NET 4 7th Dec 2005 12:09 PM
Options for an Enum with reserved types Ryan Taylor Microsoft VB .NET 3 12th Sep 2005 03:21 PM
Datasets: Using Enum types =?Utf-8?B?SmVyZW15?= Microsoft VB .NET 2 20th Jul 2004 01:03 PM
Re: 'in' style operator on enum types? Miha Markic Microsoft C# .NET 4 17th Jul 2003 02:33 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 07:58 AM.