Hi,
I've a WebDropDown control and have assigned a width to it. User selects any one value from the drop down list and we fire a server side event using OnSelectionChanged handler. After doing server side processing the width of the input field of WebDropDown reduces. We'd set the width of WebDropDown using Width property and made sure the css class igdd_ValueDisplay has Width set to 100%. Still no luck.
Also AutoPostBackFlags-SelectionChanged is set to "On".
Can you please let me know if I'm missing anything.
Thx,
Sagar
Hi Sagar,
Thank you for your reply.
I am yet unable to replicate the matter. A small sample illustrating the issue would be greatly appreciated. Any additional information you can provide me with regarding the specifics of the scenario would help me to isolate the matter.
Regarding accessing your WebDropDown on the client, I would suggest that you try that using:
$find('<%= WebDropDown1.ClientID %>')
Please feel free to contact me with any additional questions.
Hi Petar,
The solution you provided works in one way. I've written the initialize method at client side and debugged it. ig_controls shows 2 members out of which one is the WebDropdown list which we're interested in. However we cannot directly use it as "ig_controls.WebDropDown1._elements..." because inside ig_controls, it shows client id of the control and not the one which we gave.. something like "ig_controls.ctl00_ViewContent_something_webDropDown1".
Have you tried using it directly like "ig_controls.WebDropDown1._elements ... "? Hard coding the client id in java script is one option but that's not a good idea.
Can you please let me know? Thanks a ton for your reply.
-Sagar
I'm using version 10.2 and it is reproducible. I might be missing something. If required, I'll provide a sample to you. Let me know.. Trying your solution on my current version, not sure if it will work. Will keep you posted soon with the results.
Thank you for posting in the community.
So far I am unable to replicate the matter using version 11.2. In order to research the matter further I would need a sample illustrating the behavior. In the meantime you could try using the Initialize client-side event to try and set the width of the input field using:
ig_controls.WebDropDown1._elements["Input"].style.width = "100%";
Please feel free to contact me if you have any questions.