At 11:50 AM 7/1/2004 -0400, Joel Solomon wrote:

I have two questions regarding the use of a DB Grid in a form.

1. Is there a way to change the column headings without changing the field name in the table?

Here's how:

Form Designer > DB Grid Control > Properties > Columns

. Use the ">" or ">>" buttons to bring over the column(s) to the right
  side to customize.

. Highlight the individual column to customize the property
  (either right-click or use column properties icon)

  There you have the following options:

  . Title Properties: Alignment, Background Color, Caption, Font, Color
  . Column Properties: Alignment, Background Color, Width, Font, Color
  . Read Only

  You may also highlight all columns and then right-click to change
  properties.

For examples, take a look at the following forms in ConComp and RRBYW8
sample databases.

Database: ConComp
Forms: DBGridAndListBoxes
       DBGridAndNavigator
       DBGridCustomColumn

Database: RRBYW8
Forms: SalesTransactions


2. Is there a way to sort the columns prior to using them in the form or do I have to restructure
the table so it is in the correct order?


If the DB Grid control belongs to the Master table, then use:

EDIT USING formname WHERE whereclause ORDER BY orderbyclause

If the DB Grid control belongs to the Slave table, use ARRANGE BY ...

Example:

EDIT USING formname +
ARRANGE slavetableA BY columnname ASC, +
ARRANGE slavetableB BY columnname ASC, +
ARRANGE slavetableC BY columnname ASC, +
ARRANGE slavetableD BY columnname ASC +
ORDER BY colmunname

Enjoy and make sure to have fun!

Very Best R:egards,

Razzak.



Reply via email to