Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Date format and right aligment in True DB Grid

Status
Not open for further replies.

ndevriendt

Programmer
Jan 8, 2002
74
0
0
BE
Hello

I write a program in Visual Basic and work with the Control True DB Grid. With this True DB Grid I have 2 problems.

My first problem is: My grid have two columns. I want that the second column
is right aligned. I have set the alignment properties of the column on the right.
But when I select a record only the selected record is shown at the left side instead of the right side and this only for the current record.

Does somebody have an answer on this ?

My second problem is a much bigger problem with the dates.
The data that is showned in the grid is the result
of a select statement of SQL Server:

select description,from_date,to_date,Price from Tarif

In the grid he shows me the dates in the format MM/dd/yyyy in stead of dd/MM/yyyy. How can I show this in the Grid in the format dd/MM/yyyy.
I have also a textbox with this dates and there is set the
format of the textbox to dd/MM/yyyy and he show me the dates in the textbox in the format I want, but when I edit the field he try to save this as the format MM/dd/yyyy. So If I type 15/02/2000 (15 february) he try
to save it as (02 ????( 15 month doesn't exist)

Can somebody help me with this

Thank you for your time and answer

Devriendt Nico
 
Dear Devriendt

ur 1 problem...

if ur setting the allowfocus property to false for the date column then the alignment property changes for that column,
i mean i used to come across this problem when i used to do so. if ur doing the same then try reinstalling the TDB Grid again. Hope this solves the problem.

ur 2 problem...

Set the number format for the column to short date.

Change the date format in ur reginal setting's to dd/mm/yyyy, hope fully it must be mm/dd/yyyy.

Regards
Mahesh
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top