Scrollbar for dropdown button popup

Hi All,
Is there a way to use scrollbar in dropdown button list? Coz i have quite a lot data and scroll isnt coming .
Also how can i position the dropdown to come at top and no bottom?

Regards,
Aditya

3 Replies 1 reply marked as answer

MK Mohan Kumar Ramasamy Syncfusion Team November 26, 2020 10:11 AM UTC

Hi Aditya, 
 
We have checked your reported query. We can set scrollbar in dropdown button popup using CSS style. Please refer below code snippets. 
 
 
.e-dropdown-popup ul { 
  height: 200px; 
  overflow-y: scroll; 
} 
 
 
And also Dropdown button popup open position can be changed in open event by setting top and left for the popup element. Please refer below code snippets. 
 
 
  <button 
            ejs-dropdownbutton 
            #dropdownbutton 
            [items]="items" 
            content="Profile" 
            (open)="onOpen($event)" 
          ></button> 
 
  // To open popup in particular position. 
  public onOpen(args: OpenCloseMenuEventArgs) { 
    args.element.parentElement.style.top = 
      this.dropdownbutton.element.getBoundingClientRect().top - 
      args.element.parentElement.offsetHeight + 
      "px"; 
  } 
 
 
For your reference, we have prepared a sample based on this. Please refer below link. 
 
 
 
Please let us know, if you need any further assistance. 
 
Regards, 
Mohan kumar R 


Marked as answer

AM Aditya Murthy December 4, 2020 08:41 AM UTC

HI Mohan Kumar,
The solution you provided works perfectly for my requirement .
Thanks for the solution
Regards,
Aditya


MK Mohan Kumar Ramasamy Syncfusion Team December 4, 2020 08:45 AM UTC

Hi Aditya ,   
  
Thanks for the update.  
 
We are happy to hear that your requirement has been fulfilled. Please feel free to contact us if you need any further assistance on this. 
 
Regards, 
Mohan kumar R 


Loader.
Up arrow icon