What are the values for the DropDownButton dir property

1 Answer 34 Views
DropDownButton
Simon
Top achievements
Rank 1
Simon asked on 10 Oct 2024, 10:38 PM

Hi

I am trying to set my dropdown menu from the dropdownbutton to appear to the left of the button.  Their is a property named dir of type string, which I am assuming does this but I cannot find the valid values for this property.  I have tried 'left'.

Any help would be appreciated.

Cheers

Simon

 

 

1 Answer, 1 is accepted

Sort by
0
Vessy
Telerik team
answered on 11 Oct 2024, 01:46 PM

Hello, Simon,

The DropDownList "dir" prop represents the standard html dir attribute used to set the direction of the elements. The accepted values are "rtl", "ltr" and "auto":

Below you can see a sample where the direction of the DropDownList is set to rtl - is this the behavior you are after?

Kind regards,
Vessy
Progress Telerik

Love the Telerik and Kendo UI products and believe more people should try them? Invite a fellow developer to become a Progress customer and each of you can get a $50 Amazon gift voucher.

Simon
Top achievements
Rank 1
commented on 15 Oct 2024, 01:23 AM

Hi Vessy

That go me one step closer but not quite there.  It's a dropdowbutton (in a datagrid cell) that I am working with.

I started with this:

After changing the dir to 'rtl', I got this:

What I am trying to achieve is something like this which I created in MSPaint:

Any suggestions?

Vessy
Telerik team
commented on 16 Oct 2024, 04:54 PM

Hi, Simon,

Thanks a lot for the screenshots. You can achieve a behavior similar to the one shown on the third image by configuring the popupAlign prop of the DropDownButton. It accepts a value of type Align which provides the following alignment options:

For example, you can have a similar setup:

        popupSettings={{
          popupAlign: { horizontal: 'right', vertical: 'top' },
        }}

Tags
DropDownButton
Asked by
Simon
Top achievements
Rank 1
Answers by
Vessy
Telerik team
Share this question
or