|
-
July 23rd, 2012, 10:28 AM
#16
Re: Database field format in FlexGrid
Is using the Flexgrid a requirement? As far as I know there is no way to auto format the data in a flex grid but this can be done easily in a DBGrid. Would you be able to use that instead?
Always use [code][/code] tags when posting code.
-
July 23rd, 2012, 11:41 AM
#17
Re: Database field format in FlexGrid
He wants to CHANGE THE FONT.
-
July 23rd, 2012, 12:52 PM
#18
Re: Database field format in FlexGrid
 Originally Posted by dglienna
He wants to CHANGE THE FONT.
Where did you see this? I see no reference to changing font anywhere in the thread except your post. I see that he wants to change the format which is simple with the dbgrid, you can afaik also change the font for the dbgrid as a whole.
Always use [code][/code] tags when posting code.
-
July 23rd, 2012, 04:35 PM
#19
Re: Database field format in FlexGrid
Have you tried to write all the fields of the record instead of use the *
Example
SELECT Fieldname1, Fieldname2, Format(Fieldname3,"dd/mm/yyyy" ), Fieldname4 FROM ...
JG
... If your problem is fixed don't forget to mark your threads as resolved using the Thread Tools menu ...
-
July 23rd, 2012, 08:40 PM
#20
Re: Database field format in FlexGrid
Edited to say FORMAT rather than FONT. Don't know what CG did to the edit...
-
July 24th, 2012, 09:41 AM
#21
Re: Database field format in FlexGrid
Sorry for late replying, still suffer from sickness.
@jggtz: I have selected the fields to go to the list all by name. No "*".
I will try this:
SELECT Fieldname1, Fieldname2, Format(Fieldname3,"dd/mm/yyyy" ), Fieldname4 FROM ...
although I never saw something like a format statement embedded in an sql query. Thanks.
@DataMiser and David: I used MSHFlexGrid, because I was already familiar to it. I might try DataGrid if you say it can change the format for a column, but I have one thing in common to all lists in the program: I have made sorting occur when clicking on the column headers. Should be able to handle this in a similar way with DataGrid. I will take a look to that control, thanks.
-
July 24th, 2012, 10:23 AM
#22
Re: Database field format in FlexGrid
Normal Flexgrid lets you intercept click events. Look for the FLOATING TEXTBOX examples to replace actual cells with input.
-
July 24th, 2012, 01:54 PM
#23
Re: Database field format in FlexGrid
Right syntax
Code:
SELECT Fieldname1, Fieldname2, Format(Fieldname3,'dd/mm/yyyy' ) As Exprname3, Fieldname4
FROM Tablename1
https://www.google.com.mx/#hl=es-419...iw=800&bih=457
JG
... If your problem is fixed don't forget to mark your threads as resolved using the Thread Tools menu ...
-
July 24th, 2012, 06:24 PM
#24
Re: Database field format in FlexGrid
-
July 25th, 2012, 10:05 AM
#25
Re: Database field format in FlexGrid
Seems because there is a link now to the source of the information.
I don't need to change data while in grid view. It is only for display.
-
July 25th, 2012, 10:24 AM
#26
Re: Database field format in FlexGrid
Ok, fine.
jggtz, your solution works perfect. I have to change the final query string just before I open the recordset, though, but this is a minor change in the end.
Very good. Thank you.
-
July 25th, 2012, 11:23 AM
#27
Re: [RESOLVED] Database field format in FlexGrid
good work jggtz 
Unbelievable
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|