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?
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.
Hi, Nikolay.
What's a setting properties instead using Java?
It doesn't seem to work. When I click on the button, the container never drops down.