Odd layout issue with Picker

May 28, 2009 at 8:23 AM

Hi ,

Thanks for wonderful picker.
I really can't understand why the product doesn't have this built in. ... beats me.
It's insane to imagine (hallucinate) that relations between entities would be limited to only handful of records.

Anyways, I'm using your picker in a situation where I am creating webpart forms myself with "new FormField()"-method.
Basically along these lines: http://www.hezser.de/blog/archive/2007/04/29/how-to-use-the-sharepoint-web-controls.aspx

The control works very nicely, but the form layout comes out a little funny: All the other controls are of the same width (rougly 1/3 of the table), but your control fills the whole table.

sort of like:

xxxx
zzzz
yyyyyyyyyyyyyyyyy
xxxx
zzzz

Your control being y.

Any ideas ?

Regards,

Petri.

 

May 28, 2009 at 1:00 PM

... oh and one more thing.

When looking at the generated html-source I noticed that your control spits out Title="Object Picker".  ... As in literally so.
Where Microsoft controls spit out Title="@Field Title" and that makes for very handly javascript selection with functions like:

function getField(fieldType,fieldTitle) {
    var docTags = document.getElementsByTagName(fieldType);
    for (var i=0; i < docTags.length; i++) {
        if (docTags[i].title == fieldTitle) {
            return docTags[i]
        }
    }
}

And this of course doesn't work well when I have two or more pickers since they all have the same Title.

regards,

Petri.