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
470
UltrawebGrid set ValueList width
posted

I've set up an UltraWebGrid with a dropdown type column defined as follows..

 

                                <igtbl:UltraGridColumn BaseColumnName="EXTRADELAY1" Key="EXTRADELAY1" IsBound="false" Type="DropDownList"  Width="40px" CellButtonDisplay="Always" ValueList-Style-Width="500%">
                                    <Header Caption="Extra<br />Delay<br /><br />1">

                                    </Header>
                                    <ValueList>
                                        <ValueListItems >
                                            <igtbl:ValueListItem DataValue="15" Key="15" DisplayText="15 Minutes" />
                                            <igtbl:ValueListItem DataValue="30" Key="30" DisplayText="30 Minutes" /> 
                                            <igtbl:ValueListItem DataValue="45" Key="45" DisplayText="45 Minutes" /> 
                                            <igtbl:ValueListItem DataValue="60" Key="60" DisplayText="1 Hour" />
                                            <igtbl:ValueListItem DataValue="60" Key="60" DisplayText="1 Hour" />                                                                                                                     
                                            <igtbl:ValueListItem DataValue="90" Key="90" DisplayText="1.5 Hours" />
                                            <igtbl:ValueListItem DataValue="120" Key="120" DisplayText="2 Hours" />
                                            <igtbl:ValueListItem DataValue="180" Key="180" DisplayText="3 Hours" />
                                            <igtbl:ValueListItem DataValue="360" Key="360" DisplayText="6 Hours" />
                                            <igtbl:ValueListItem DataValue="720" Key="720" DisplayText="12 Hours" />
                                            <igtbl:ValueListItem DataValue="1440" Key="1440" DisplayText="1 Day" />
                                            <igtbl:ValueListItem DataValue="2880" Key="2880" DisplayText="2 Days" />
                                        </ValueListItems>
                                    </ValueList>
                                </igtbl:UltraGridColumn>

Eventually it will be bound to data - for the moment I'm just trying to get the correct functionality.

I have the column width correct for read-only display, but when the dropdown opens I need the valuelist to be wider than the column to clearly display the text of the choices.

I've tried using ValueList-Style-Width with a pixel value and with a percentage value but the dropdown stays the same width as the column. How can I make the dropdown wider than the column width?

This is v10.2 by the way.

Parents
  • 4555
    posted

    Hi,

    You can change the style of the DropDown using document element.  The following code snippet will change the color to red:

      var select = document.getElementById("UltraWebGrid1_vl");
        select.style.color = "red";

    The width is dependent on the column and you cannot change it.

    Magued

     

Reply Children