简体   繁体   中英

Prevent Dojo DropdownMenu from closing

I use a Dojo Enhanced Grid to display various data. With a DropDownMenu I give the user the ability to show additional colums.
But this is a little bit uncomfortable. Because the user has to click for every new colum onto the menu.
Is there a possibility to prevent the DropDownMenu from closing? Or should I use another widget for this?

I'd suggest you look into Dojo dgrid , and the ColumnHider extension . It effectively recreates what you're doing, and is available out-of-the-box, including the feature you're after.

An alternate solution is to use a dijit/TooltipDialog , whose default behavior is to stay open when one of its contents is clicked.

yourGrid.openDropDown(); will open the menu back again, and you would not really notice that it was displayed back again after a close.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM