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
245
WebDropDown Width Resetting
posted

I have the following webDropDown inside an update panel:

//Sets the selected value as the text, rather than the selected text
function webDropDown_SelectionChanging(sender, e) {
    e.get_value()[0].set_text(e.get_value()[0].get_value());
}    

On page load:

With departments
.SQL = "SELECT DI.DEPARTMENT DEPT, DI.DEPARTMENT_DESC DESCR FROM COMMISH.DEPARTMENT_INFO DI WHERE DI.ACTIVE_FLAG = 'Y' ORDER BY DEPARTMENT_NUMBER"
If .Select_Records_Custom_SQL(dtData) Then
Me.wddDepartment.DataSource = dtData
Me.wddDepartment.ValueField = "DEPT"
Me.wddDepartment.TextField = "DESCR"
Me.wddDepartment.DataBind()
Me.wddDepartment.NullText = " "
'uwcDepartment.DataSource = dtData
'uwcDepartment.DataBind()
End If
End With

When user clicks search:

wddDepartment.CurrentValue = CStr(.Order_Department)

Everything works like I want it to, with one exception.  When the user clicks search and the dropdown list value is updated, the dropdown width ignores its 50px width setting and is set to some default value.  First question obviously is why does it do this?  And second, how do I get it to remain at the 50px setting? 

Edit: If I remove the page_load function where I populate the dropdown list, the width does not change.  

Parents Reply Children
No Data