[Lazarus] Dropdown in stringgrid ?
Koenraad Lelong
lazarus2 at de-brouwerij.be
Fri Jun 5 12:55:51 CEST 2015
Op 03-06-15 om 01:19 schreef Jesus Reyes A.:
>
> In the grid such combobox is called a picklist.
>
> 1. Select the grid
> 2. In the Object Inspector select the columns property and click the
> "..." button.
> 3. Add some custom columns
> 4. Select the column where you wish to add a pick list
> 5. In the Object Inspector change the ButtonStyle to cbsPickList
> 6. In the Object Inspector select the PickList property and click the
> "..." button.
> 7. Add all options you want to this list.
> 8. make sure the grid is editable.
>
Thanks, just tried this, but it's not what I need.
Like I said, I want to import a csv-file. Then, using the first row, I
use a picklist of fieldnames to identify which column of the csv needs
to go to which field in the database.
Maybe this clarifies it better :
-------------------------------------------------------
| Field2 | Field1 | | Field3 | | | <---
picklist (Field1, Field2, Field3, blank)
-------------------------------------------------------
|Col0Row1|Col1Row1|Col2Row1|Col3Row1|Col4Row1|Col5Row1|
|Col0Row2|Col1Row2|Col2Row2|Col3Row2|Col4Row2|Col5Row2|
etc.
This means column0 should got to Field2 of the database, column1 should
got to Field1 of the database and column3 should got to Field3 of the
database. The rest of the columns are not needed in the database.
Koenraad.
More information about the Lazarus
mailing list