Author Topic: Grid Control Text Combo Box Questions  (Read 140 times)

Rakesh Rao

  • Member
  • *
  • Posts: 25
Grid Control Text Combo Box Questions
« on: October 03, 2021, 01:40:26 AM »

Dear Forum Users,

I am trying to learn and use the Grid control and am making painfully slow progress. The positive thing is that I am making progress and beginning to head somewhere.

I have a few questions:

1. How do I set the combo dropdown box contents to one of the specified values? I can define a combo list and populate it with some values ( like "A" "B" "C") but how do I start the control and have it select the option "B" for example. Could not figure this out despite several hours of search.

2. When I start the grid, the combo box pull down symbol does not appear (see Capture.png). Only when I click on that space and highlight it, I get to see the pull-down symbol (see Capture2.png). Is there any way to display the pull-down menu symbol automatically so that the use knows that this is a pull-down control in the grid cell.

Best Regards & Thanks in advance
Rakesh Rao


owenwengerd

  • Administrator
  • Hero Member
  • *****
  • Posts: 3059
    • Outside The Box
Re: Grid Control Text Combo Box Questions
« Reply #1 on: October 03, 2021, 07:28:21 AM »
Each grid cell has an associated cell editor that displays when the cell is being editoed. So you could call (dcl-Grid-StartCellEdit) to start editing a particular cell, and that would display the combo box for combo cell types. There is no generic way to always display the cell editor even when the cell is not being edited. You could generate your own graphics for such cells, but that would be a lot of work and no way to make it look as appealing as a real control.

As for setting a particular combo value, you just need set the cell value. The combo editor control just reflects the cell value.

Rakesh Rao

  • Member
  • *
  • Posts: 25
Re: Grid Control Text Combo Box Questions
« Reply #2 on: October 03, 2021, 07:52:08 PM »
Thanks Owen. Will try this out.