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
Hello,
I have the same problem.
I have set width property to 40px and it appears with a very larger size.
The problem (in my case) was a input[type='text'] CSS.
The WebDropDown server control become a table with an input but the width specified to the server control is not applied to the input and then the CSS was applied.
Solution for me :
put the WebDropDown into a div with the width and overload the CSS with width : auto;
sorry for my english :)
Hi Sagar,
Glad that your issue has been resolved. I have attended to your other questions in the thread you have provided.
Hi Petar,
Not sure what caused the problem but was able to solve it using the solution you provided earlier.
Thanks for your quick replies. I really appreciate it.. it helped me to come to the solution quicker.
Petar, I need one more favor from you. I'm facing an issue in other control of Infragistics which I've posted a week ago and have not received any update from infra team. I'm waiting on it. Can you please have a look into it as well if you get a chance?
Here's the link to the post: http://forums.infragistics.com/forums/p/64452/326832.aspx
Thanks once again..!
-Sagar
Thank you for your code.
I have tested it under 10.2.20102.1000 but unfortunatelly the behavior still does not manifest itself. The issue may be related to either the specific processing you are applying server-side, or the nesting of the dropdown in other controls/elements. Also note that the <td> element in which the dropdown's input is rendered, has width: 100% applied by default. I suggest that you investigate whether this element is not having some other style property applied after postback:
<td style="width:100%;"><input id="x:783110646.2:mkr:Input" class="igdd_ValueDisplay " type="text" value="ASDasdasD" tabindex="0" accesskey="" autocomplete="off" mkr="Input"></td>
Feel free to contact me with any questions.
$find('<%= %>') doesn't work because we have to set the width thru "ig_controls.WebDropDown1_ClientID._elements ..." so $find isn't useful in this context.
And for the sample you wanted to replicate this issue, here it goes:
<ig:WebDropDown ID="WebDropDown1" runat="server" NullText="my search" Width="300px"
AutoSelectOnMatch="false" CssClass="igdd_ValueDisplay"
DropDownContainerHeight="150px" DropDownContainerWidth="300px"
EnableClosingDropDownOnSelect="false" EnableAutoCompleteFirstMatch="false" KeepFocusOnSelection="false"
EnableAjaxViewState="true"
EnableAutoFiltering="Client" AutoFilterQueryType="Contains" EnableViewState="true"
OnSelectionChanged="WebDropDown1_SelectionChanged">
<AutoPostBackFlags SelectionChanged="On" ValueChanged="Off" />
<Items>
<ig:DropDownItem Selected="False" Text="1" Value="1">
</ig:DropDownItem>
<ig:DropDownItem Selected="False" Text="2" Value="2"> </ig:DropDownItem>
<ig:DropDownItem Selected="False" Text="11" Value="11">
</Items>
</ig:WebDropDown>
And in code behind we define the event handler for Selection Changed event. So using this markup you should be able to repro this issue.