C1TrueDBGrid and C1TrueDBDropDown

Posted by: s.wortmann on 8 May 2022, 7:27 pm EST

    • Post Options:
    • Link

    Posted 8 May 2022, 7:27 pm EST

    Hello,

    I am a bit stumped and can not get any further.

    In a C1TrueDBGrid I use a column “customer name” (Datatype:string). That column should become now to a DropDown selection.

    In a C1TrueDBDropDown all customers (fields: custNo and custName are displayed. I get the records from the customer table.

    When selecting a customer, the “custNo” should be stored in the field in the C1TrueDBGrid, but the “customer name” should be displayed.

    Is this possible?

    If yes, I would be pleased about a small - if possible VB - example.

    Best regards

    Stephan

  • Posted 8 May 2022, 7:53 pm EST

    One more thing I forgot.

    Is it possible to adjust the width of the C1TrueDBDropDown to the linked column of the C1TrueDBGrid or is it possible to set the width of the DropDown larger than the linked column?

  • Posted 9 May 2022, 4:46 pm EST

    Hi Stephan,

    To show translated Text in the C1TrueDBGrid Cells according to the values selected from the C1TrueDBDropDown, you can set its ValueTranslate property to true. You also need to set the ValueItems.Translate property for the required C1DataColumn to true.

    To handle the size of the dropdown manually, you can set the DropdownWidth property of the C1TrueDBDropdown to DropdownWidthEnum.Default and handle the size by using its Height and Width properties. Else, you can set the DropdownWidth property to DropdownWidthEnum.Column, which will handle the size automatically according to the column.

    Please refer to the attached sample showing the above approaches.

    Kind Regards,

    Kartik

    DropDown_TDBG_Translate.zip

Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels