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 derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search results for query: *

  1. krisleech

    How to convert integer to string in DBGrid

    I have it working....! Just deleted all the fields in the field editor and re-added them, then deleted all entries in the dbgrid and re-added them and it worked fine. Think I must have had some settings wrong from previous atempts. Much apricated advice all, cheers Kris.
  2. krisleech

    How to convert integer to string in DBGrid

    Thanks VintageWine (nice name) That looks perfectly what I want to do. I added all the fields to the fields editor for the table that feeds the dbgrid and added the code to the OnGetText but nothing gets displayed now, not the real field values or the string values?? You said to make the fields...
  3. krisleech

    How to convert integer to string in DBGrid

    > Are the string values that define the numbers in a separate table? No, I want to use hard code to change the numbers in to string. The code looks good, but I dont have a OnCalcField event!?! Im using Delphi 5, standard Dbgrid component. Do I need to create a calculated field? Cheers Caz.
  4. krisleech

    How to convert integer to string in DBGrid

    Thanks, i tried: if field.AsInteger = 0 then MessageDlg('ok', mtWarning, [mbOK], 0); But no popup message is displayed. How would you use this function is field.asinteger refering to the field number or the actual value of a field? Cheers for the help, Kris.
  5. krisleech

    How to convert integer to string in DBGrid

    Thanks would that be the DrawDataCell event of the DBgrid? If so I have "const Rect: TRect; Field: TField;" availible to use, I could tell which field I am on using the Field varible however I cant refrence this witha string eg. If Field = 'status' then XYZ.... TField and String not compatible...
  6. krisleech

    How to convert integer to string in DBGrid

    Hi ya all, I have a DBGrid, one of the fields is an integer field. Each integer repsents a stage or status. How do I make the DBGrid show a string instead of the integer. eg. 1 would be replaced by "Start", 2 would be replaced by "Middle" and 3 replaced by "End". Any help or pointers would be...

Part and Inventory Search

Back
Top