ComboBox DropDownWidth

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Peter Larsen [CPH]

    ComboBox DropDownWidth

    Hi,

    How do i set DropDownWith in a asp.net ComboBox ??

    Thank you in advance.

    BR
    Peter


  • bruce barker

    #2
    Re: ComboBox DropDownWidth

    this is no combobox in asp.net. i assume you mean the dropdown
    (<select>). the width of the control is set with the style width
    com,mand like any other dom object. if you mean the width of the actual
    dropdown, this is not settable with most browsers.

    if you need this feature you will need an dom/javascript based control.
    there are a lot of samples, but you need to determine what features you
    need. most are pretty weak on keyboard support, so be sure to check that.

    -- bruce (sqlwork.com)

    Peter Larsen [CPH] wrote:
    Hi,
    >
    How do i set DropDownWith in a asp.net ComboBox ??
    >
    Thank you in advance.
    >
    BR
    Peter
    >
    >

    Comment

    • Steven Cheng

      #3
      RE: ComboBox DropDownWidth

      Hi Peter,

      As bruce suggested, the ASP.NET built-in control only support a
      dropdownlist or ListBox, no combox control. Also, for dropdownlist and
      listbox, they're based on the pure HTML <selectelemen t.

      If you need a combobox, you can have a look at some community member's
      custom control which may provide some more customizable propeties (since
      those controls are built via custom html elements ):

      #ASP.NET ComboBox

      px

      #ComboBox Control for ASP.NET


      Sincerely,

      Steven Cheng

      Microsoft MSDN Online Support Lead


      Delighting our customers is our #1 priority. We welcome your comments and
      suggestions about how we can improve the support we provide to you. Please
      feel free to let my manager know what you think of the level of service
      provided. You can send feedback directly to my manager at:
      msdnmg@microsof t.com.

      =============== =============== =============== =====
      Get notification to my posts through email? Please refer to
      http://msdn.microsoft.com/en-us/subs...#notifications.

      Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
      where an initial response from the community or a Microsoft Support
      Engineer within 1 business day is acceptable. Please note that each follow
      up response may take approximately 2 business days as the support
      professional working with you may need further investigation to reach the
      most efficient resolution. The offering is not appropriate for situations
      that require urgent, real-time or phone-based interactions or complex
      project analysis and dump analysis issues. Issues of this nature are best
      handled working with a dedicated Microsoft Support Engineer by contacting
      Microsoft Customer Support Services (CSS) at
      http://support.microsoft.com/select/...tance&ln=en-us.
      =============== =============== =============== =====
      This posting is provided "AS IS" with no warranties, and confers no rights.

      --------------------
      >From: "Peter Larsen [CPH]" <PeterLarsen@co mmunity.nospam>
      >Subject: ComboBox DropDownWidth
      >Date: Tue, 30 Sep 2008 15:19:20 +0200
      >Hi,
      >
      >How do i set DropDownWith in a asp.net ComboBox ??
      >
      >Thank you in advance.
      >
      >BR
      >Peter
      >
      >
      >

      Comment

      • Peter Larsen [CPH]

        #4
        Re: ComboBox DropDownWidth

        Hi Steven and Bruce,

        Thanks for you comments.

        This is the code:

        <td class="searchHe adLine"<%-- Fund --%>
        <asp:dropdownli st id="fundSearchC ombo" runat="server" width="150px"
        autopostback="t rue" OnSelectedIndex Changed="OnFund SearchComboChan ge">
        <asp:ListItem Text="No Selection"></asp:ListItem>
        </asp:dropdownlis t>
        </td>

        I don't need to be able to set the dropdown width manually. I just want the
        combobox to asjust the width automatically on dropdown - just like what
        Firefox do.
        Using Internet Explorer, the dropdown box is the same width as the combobox.

        Why is it possible with firefox, but not with IE ??

        BR
        Peter


        Comment

        • Steven Cheng

          #5
          Re: ComboBox DropDownWidth

          Thanks for your reply Peter,

          I've got the things you mentioned. I'm afraid this width behavior is fixed
          by the dropdownlist (html <select>) component of IE browser. The IE browser
          use the window standard dropdownlist for rendering <selecthtml element on
          web page. I think FireFox use its own implementation which is different
          from IE. And this behavior is not controlled by standard css or html
          attribute.

          But it is really a good idea to improve the dropdown control in IE. You're
          welcome to post you feedback to the new opening IE connect feedback site:

          When January's chill grips Iceland, locals turn to


          Sincerely,

          Steven Cheng

          Microsoft MSDN Online Support Lead


          Delighting our customers is our #1 priority. We welcome your comments and
          suggestions about how we can improve the support we provide to you. Please
          feel free to let my manager know what you think of the level of service
          provided. You can send feedback directly to my manager at:
          msdnmg@microsof t.com.

          =============== =============== =============== =====
          Get notification to my posts through email? Please refer to
          http://msdn.microsoft.com/en-us/subs...#notifications.

          =============== =============== =============== =====
          This posting is provided "AS IS" with no warranties, and confers no rights.
          --------------------
          >From: "Peter Larsen [CPH]" <PeterLarsen@co mmunity.nospam>
          >References: <eZ$Yn8vIJHA.13 04@TK2MSFTNGP02 .phx.gbl>
          <ufyv653IJHA.37 64@TK2MSFTNGHUB 02.phx.gbl>
          >Subject: Re: ComboBox DropDownWidth
          >Date: Wed, 1 Oct 2008 13:47:35 +0200
          >
          >Hi Steven and Bruce,
          >
          >Thanks for you comments.
          >
          >This is the code:
          >
          ><td class="searchHe adLine"<%-- Fund --%>
          <asp:dropdownli st id="fundSearchC ombo" runat="server" width="150px"
          >autopostback=" true" OnSelectedIndex Changed="OnFund SearchComboChan ge">
          <asp:ListItem Text="No Selection"></asp:ListItem>
          </asp:dropdownlis t>
          ></td>
          >
          >I don't need to be able to set the dropdown width manually. I just want
          the
          >combobox to asjust the width automatically on dropdown - just like what
          >Firefox do.
          >Using Internet Explorer, the dropdown box is the same width as the
          combobox.
          >
          >Why is it possible with firefox, but not with IE ??
          >
          >BR
          >Peter
          >
          >
          >

          Comment

          • Peter Larsen [CPH]

            #6
            Re: ComboBox DropDownWidth

            Hej Steven,

            Thanks for your reply.
            Isn't DropDownWidth a standard property ??
            Anyway, i think i'll post a comment at microsoft about IE - and look for a
            custom control.

            BR
            Peter


            Comment

            • Steven Cheng

              #7
              Re: ComboBox DropDownWidth

              Thanks Peter,

              So far "DropDownWi dth" property is still not supported on IE.
              Appreciate your feedback.

              Sincerely,

              Steven Cheng
              Microsoft MSDN Online Support Lead

              Delighting our customers is our #1 priority. We welcome your comments and
              suggestions about how we can improve the support we provide to you. Please
              feel free to let my manager know what you think of the level of service
              provided. You can send feedback directly to my manager at:
              msdnmg@microsof t.com.

              --------------------
              >From: "Peter Larsen [CPH]" <PeterLarsen@co mmunity.nospam>
              >References: <eZ$Yn8vIJHA.13 04@TK2MSFTNGP02 .phx.gbl>
              <ufyv653IJHA.37 64@TK2MSFTNGHUB 02.phx.gbl>
              <OEyrAu7IJHA.46 8@TK2MSFTNGP06. phx.gbl>
              <2Gh47NRJJHA.16 52@TK2MSFTNGHUB 02.phx.gbl>
              >Subject: Re: ComboBox DropDownWidth
              >Date: Fri, 3 Oct 2008 15:03:55 +0200
              >Hej Steven,
              >
              >Thanks for your reply.
              >Isn't DropDownWidth a standard property ??
              >Anyway, i think i'll post a comment at microsoft about IE - and look for a
              >custom control.
              >
              >BR
              >Peter
              >
              >
              >

              Comment

              Working...