473,409 Members | 1,966 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,409 software developers and data experts.

Dateformat on databound textboxes?

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


Nov 20 '05 #1
1 1151
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/de...ntexttopic.asp

--
W.G. Ryan MVP Windows - Embedded

Have an opinion on the effectiveness of Microsoft Embedded newsgroups?
Let Microsoft know!
https://www.windowsembeddedeval.com/...ity/newsgroups
"Graham Blandford" <gr**************@sympatico.ca> wrote in message
news:Ux********************@news20.bellglobal.com. ..
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

Nov 20 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: John Smith | last post by:
Hello all: Another day another problem :). How do you synch a databound combobox with the rest of the controls that are on a form. I have a combobox that lists a bunch of names and upon...
0
by: Coco | last post by:
Hi, who knows how to update the 'child' textboxes in a datarelated situation if the child records "doesn't yet exitsts/are still empty"? The problem can be explained with the Northwind database....
1
by: Matt | last post by:
I recently came across what I believe to be a peculiar bug with Mdi Children, and wanted to see if anyone else had experienced this before sending it in. The issue is as follows: I have a number...
0
by: Michael | last post by:
Hello, I have a windows app I'm writing in C#. It is connected to a MS Access database. The Database has two tables, User table and UserRights table. They are related on UserID. Now in the app,...
3
by: Dustin Davis | last post by:
Setting up databindings for controls like textboxes and checkboxes is pretty straightforward, but how do you set up a databound radio group? For example, say I have source_type in my database...
5
by: maurban | last post by:
Hi there experts, I have a gridview with a couple textboxes and a dropdownlist. I'm trying to insert a default value into my database driven dropdownlist. I'm doing this in the rowdatabound...
0
by: morathm | last post by:
I have a windows client database management application written in C# that connects to remote web services to do all the heavy work. The thin-client app uses strong typed datasets, all maintained at...
1
zigman68
by: zigman68 | last post by:
I have a problem with the DateFormat() Function that is driving me nuts! I am downloading a csv and then parsing through it, then inserting into a SQL 2005 DB. Here is the problem. ... A number of...
2
by: janders468 | last post by:
Is it possible to hide the new row record in a databound form? For instance if I have textboxes representing the records of an underlying table can I suppress the bottom row of blank textboxes?
5
by: nzkks | last post by:
Hi I am using these: ASP.Net 2.0, VB.Net, Visual Studio 2005, SQL Server 2005, Formview controls In a ASP.Net form I have 20 textboxes and 20 dropdownlists(ddl). All ddl(s) are databound and get...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.