locked
Lookup dropdown list > 20 items renders funny

    Question

  • Hi,

    On a MOSS site with the Publishing module enabled I'm experiencing some weird rendering issues with dropdown lists for Lookup fields in edit mode. When clicking the dropdown to select a value, the dropdown pops up somewhere entirely different on the page. I have googled this thoroughly but haven't really found any good solutions to this problem yet.
    I understand that SharePoint changes how a dropdown is rendered when the number of items is more than 20, but I'm still hoping that this issue can be fixed in the masterpage and/or stylesheet?

    Any thoughts and/or solutions?

    Thanks!
    Monday, June 8, 2009 12:56 PM

Answers

  • It's in the core.js file, and changing that file isn't supported - you could override the appropriate CS by inserting it later in your file though.

    THe reason it changes the rendering style when there is over 20 items is that it changes it to a filtering list, so when you start typing it filters the list box options, making selecting items from large lists much easier.

    Personally I would strongly recommend that you take a look at your master page and CSS before you go changing the JavaScript, but either method should let you solve the problem.
    Brian Farnhill
    MCAD | MCTS
    blog.brianfarnhill.com
    Canberra SharePoint User Group
    Tuesday, June 9, 2009 9:21 AM

All replies

  • It is definately to do with the master page and CSS styles that you are using - I can't remember exactly what causes it (I think it might have been caused by having some DIV tags with absolute positioning and a fixed height above where the drop down rendered). Try to remove your CSS and add the styles back a few at a time until you find which style in particular causes the behavior. (This of course assumes you have custom CSS applied - if you are only using the OOTB master pages and CSS then you might have another problem all together)
    Brian Farnhill
    MCAD | MCTS
    blog.brianfarnhill.com
    Canberra SharePoint User Group
    Monday, June 8, 2009 8:47 PM
  • I'm using a custom masterpage and a custom css so yeah, it probably has something to do with those.
    I just wish I easily could overrun that silly dropdown. I just don't get it; what could possibly be a good reason to change the rendering of a dropdown list when it has more than 20 items? It just doesn't make sense.

    But, nevertheless, I'll have to deal with it one way or another.

    Thanks.
    Tuesday, June 9, 2009 8:28 AM
  • Hi Relapse666,

    I don't think it is because of you custom master page / css.

    I think this is a new functionality that the drop down converts into a ediatble drop down when the item count is > 20.

    This happens only in IE (i think so)


    To Avoid this you can use UnlimitedLengthInDocumentLibrary = "True" in the Custom List List Defination File.

    check this link: http://www.sharepoint-tips.com/2007/04/fixing-lookup-fields-in-list-definition.html

    Hope this helps you


    Raghavan

    Tuesday, June 9, 2009 8:47 AM
  • Does anyone know where to find the javascript that is used to create the >20 items version of the drop down list?
    Tuesday, June 9, 2009 9:15 AM
  • It's in the core.js file, and changing that file isn't supported - you could override the appropriate CS by inserting it later in your file though.

    THe reason it changes the rendering style when there is over 20 items is that it changes it to a filtering list, so when you start typing it filters the list box options, making selecting items from large lists much easier.

    Personally I would strongly recommend that you take a look at your master page and CSS before you go changing the JavaScript, but either method should let you solve the problem.
    Brian Farnhill
    MCAD | MCTS
    blog.brianfarnhill.com
    Canberra SharePoint User Group
    Tuesday, June 9, 2009 9:21 AM
  • I know it is kind of an old post but I was wondering if you have a workaround to override css to render correctly in IE. I am having the exact same problem but couldn't figure out what property to override or how to handle the problem.

    JQuery works as expected when you have >20 items but its just the css applied to the control differently when you have >20 items.

    Thank you.

    Tuesday, April 6, 2010 3:18 PM
  • Hi, I have the same problem, what was the solution?

     

    Thanks

    Thursday, June 3, 2010 9:00 AM