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?
Hi, Nikolay.
What's a setting properties instead using Java?
Hello algunderson,
I'm just checking if you had a chance to test my sample and see if the provided solution works for you.
Hi algunderson,
I am attaching a sample for your reference.
If you have any questions, please let me know.
It doesn't seem to work. When I click on the button, the container never drops down.
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.