Results 1 to 2 of 2

Thread: cannont convert string to guid using ctype funtion

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Oct 2003
    Posts
    436

    cannont convert string to guid using ctype funtion

    Dim customerId As Guid = CType(customerGrid
    (customerGrid.CurrentRowIndex, 0), Guid)

    customergrid is a grid control

    The error that comes up is "Specified cast in not valid"

    I don't know what to do. any ideas , if I am doing any mistake?

    thanks
    nath

  2. #2
    I wonder how many charact
    Join Date
    Feb 2001
    Location
    Savage, MN, USA
    Posts
    3,704
    Not sure what exactly you are converting there... but in a standard way... you create a guid from a string this way:
    VB Code:
    1. Dim x As Guid = New Guid(mystring)

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