Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
585
Automatically open combo dropdown when cell enters edit mode
posted

We are using igx-combo as the cell editor for some columns in our grid.

In order to improve the user experience, we need to automatically open the combo's dropdown when the cell enters edit mode. Unfortunately we cannot find any properties on the combo or elements in the cell on the entering edit mode event that will let us determine the actual editor that will be used.

Can someone please point us in the right direction?

Parents
No Data
Reply
  • 2420
    Verified Answer
    Offline posted
    Hello Lance,

     

    I have been looking into your question and created a small sample that demonstrates opening the cell editor combo upon entering edit mode. You can find it here.

     

    In the sample, the ViewChildren decorator is used to get the QueryList of IgxComboElements, that will be added to the DOM when entering cell edit mode and displaying the corresponding combo. Actually, the QueryList will always contain one element, which will be the combo of the currently edited cell. The combo is toggled in the onCellEditEnter event, if the edited cell’s column is the one we are targeting.

     

    @ViewChildren(IgxComboComponent)
    public combos: QueryList<IgxComboComponent>;
    //...
    public cellEditEnter(event) {
        if (event.column.field == "CategoryName") {
          requestAnimationFrame(() => {
            this.combos?.first?.toggle();
          });
        }
      }
     

    Please, test this suggestion on your side and if you require any further assistance on the matter, please let me know.

     

    Best regards,
    Bozhidara Pachilova
    Associate Software Developer
Children