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
1910
DropDownProvider - DropDownContainerWidth 100%
posted

I have a DropDownProvider being used in one of the columns in the WebDataGrid. Is there any way to make the width of the dropdown to be the same as the width of the cell? I set my cells as percentages and because of this, it's hard to set the width of the dropdown to a specific number of pixels.

Any suggestions?

Parents
  • 37874
    Verified Answer
    posted

    Hello algunderson,

    I assume you are asking about the dropdown list container, because the width of the actual dropdown control by default takes the whole width of the cell. If this is the case, you could get the width of the DropDownProvider and use it to set width of the items list container, for example in DropDownOpening event:

     function DropDownOpeningHandler(sender, eventArgs) {
        var width = sender.get_element().style.width;
        document.getElementsByClassName("igdd_DropDownListContainer")[0].style.width = width;
    }

    Let me know if this helps.

Reply Children
No Data