Results 1 to 3 of 3

Thread: Determine the column type

  1. #1

    Thread Starter
    Registered User
    Join Date
    Nov 2022
    Posts
    1

    Determine the column type

    I have a datagridview with several tables
    One of the tables I want to change the type of values it receives...how?
    exempl
    with mydatagridview

    .columns(2).valuetype = ??

    thanks

  2. #2
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    110,299

    Re: Determine the column type

    Quote Originally Posted by kebboud View Post
    One of the tables I want to change the type of values it receives
    I don't really know what that means. If you want to change the data type of a database column then you would generally use the appropriate database management app for that database. That's got nothing at all to do with a DataGridView. If that's not what you mean then I have no idea what you're talking about. Please provide a FULL and CLEAR explanation of the problem.

  3. #3
    PowerPoster Zvoni's Avatar
    Join Date
    Sep 2012
    Location
    To the moon and then left
    Posts
    4,418

    Re: Determine the column type

    Or since this is in Database: If you‘ve learned SQL, you‘d know that pretty much every SQL-Dialect offers casting of values from one Datatype to another as long as the conversion is „legal“ (trying to convert „abc“ to integer will fail everytime)
    Last edited by Zvoni; Tomorrow at 31:69 PM.
    ----------------------------------------------------------------------------------------

    One System to rule them all, One Code to find them,
    One IDE to bring them all, and to the Framework bind them,
    in the Land of Redmond, where the Windows lie
    ---------------------------------------------------------------------------------
    People call me crazy because i'm jumping out of perfectly fine airplanes.
    ---------------------------------------------------------------------------------
    Code is like a joke: If you have to explain it, it's bad

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width