Home  |  Index  |  Dotnet4all Snippets  |  Submit resources
About  |  Mail us  
Dotnet4all Logo

  Dateformat on databound textboxes? (Monday, January 30, 2006)




Found the following interesting discussion in the Newsgroups:

Dateformat on databound textboxes?
by:Graham Blandford

Hi all, Can anyone tell me how I go about setting a custom date format (or any other format for that matter) to a textbox that has a databinding? In VB6 I would do something like 'set text1.format = myformat', but that isn;t a format property in VB.NET. Any help would be gratefully received. Thanks, Graham

 Reply:
by:William Ryan eMVP

 You can use Format directly on a value, but if I understand your question correctly, you'll want to add a handler for the .Format and .Parse events. This explains it pretty well but let me know if you have any problems. http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpref/html/frlrfsystemwindowsformscontrolclassbindingcontexttopic.asp -- W.G. Ryan







 
Previous Posts
    - Moveable Toolbars
    - Help with hiding LinkButton in DataList
    - Project converted from VB6 to VB.Net gets subclass...
    - .Net says I'm not Online, but I am!
    - Freeware/shareware Windows controls
    - Combobox in datagrid?
    - To parenthesize or not... Bug in VB.Net?
    - How to change the Color of a Toolbar?
    - How to pass Objects as type System.Object?
    - How to create a Username/Login Page?

Archives
    - 2006-01-01
    - 2006-01-08
    - 2006-01-15
    - 2006-01-22
    - 2006-01-29


Disclaimer & Terms of Use  | DotNet4All.Com concept & © 2004 - 2007 by  Zelders²  - Holland