TrueDBGrid > Setting height of filterdropdown

Posted by: lars.dankenbrink on 2 November 2020, 9:25 pm EST

    • Post Options:
    • Link

    Posted 2 November 2020, 9:25 pm EST - Updated 3 October 2022, 2:33 pm EST

    Hello C1-support,

    as mentioned above I’m searching for a possibility to set the height of a filterdropdown.

    With the latest version 4.5.20202.450 there seems to be a change in behaviour. Now there are max. 5 rows for dropdown height (see attachment FilterDropdown1.jpg).

    I think in earlier versions there was a “autoheight”-function which makes it much more comfortable to choose the wanted value, if list is very long.

    Grid and column using following filter-related settings:

    
    Col.ValueItems.Presentation = C1.Win.C1TrueDBGrid.PresentationEnum.SortedComboBox
    Col.ValueItems.Validate = True
    Col.FilterDropdown = True
    
    Grd.Splits(0).DisplayColumns(Col).DropDownList = True
    Grd.Splits(0).DisplayColumns(Col).FilterButton = True
    Grd.Splits(0).DisplayColumns(Col).Button = False
    Grd.Splits(0).DisplayColumns(Col).HeadingStyle.HorizontalAlignment = C1.Win.C1TrueDBGrid.AlignHorzEnum.Near
    Grd.Splits(0).DisplayColumns(Col).Style.HorizontalAlignment = C1.Win.C1TrueDBGrid.AlignHorzEnum.Near
    
    

    Thanks for a short hint.

    Kind regards

    Lars

  • Posted 3 November 2020, 9:14 pm EST - Updated 3 October 2022, 2:33 pm EST

    Hi Lars,

    Sorry, we do not face the issue at our end as shown in the attached screenshot.

    I have also attached a sample that I am using at my end. If you are doing anything else then please let us know and modify the sample accordingly so that we can assist you accordingly.

    Regards,

    Prabhat Sharma.

    TDBDropdownDemo1.zip

  • Posted 4 November 2020, 1:26 am EST

    Hi Prabhat,

    thanks for your reply.

    I played a little bit around with your example and modified it. Your “company”-column works as expected. If you change size of dialog, dropdown grows or shrinks. In my added column (CompanyId) which is based on id/value-translation the behaviour is like written above. Only 5 rows.

    Could you please take an other look at it?

    Kind regards

    Lars

    TDBDropdownDemo1(modified).zip

  • Posted 4 November 2020, 8:43 pm EST

    Hi Lars,

    You can use the MaxComboItems property of the ValueItems class to set the number of records to appear in the dropdown. As given in the code snippet below:

    Grid.Columns(ColName).ValueItems.MaxComboItems = 10
    
    

    If you need any other help, please let us know.

    Regards,

    Prabhat Sharma.

  • Posted 15 November 2020, 7:44 pm EST

    Hello Prabhat,

    thanks for helping me out! Just tested and it works for me. :+1:

    Kind regards

    Lars

Need extra support?

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

Learn More

Forum Channels