RioterDeckers' HeadQuarter

Our opinions about Microsoft technologies and the way we are working with.
Welcome to RioterDeckers' HeadQuarter Sign in | Join | Help
in Search

Avalonboy

Build your own SharePoint 2007 Picker Dialog

In all most of the time, people are using the famous Control "DropDownList" to put a collection of data. But, what happen when this list is so huge and may a performance issue for loading your page? Even if you do that, you are killing your End-Users by scrolling in a long list. It's not a good idea for your Users. So, what we can do? The "Dialog Picker" will be your help.

I think, you will already experience with it when you try looking for Users, Groups, Audiences,... To provide its own in SharePoint 2007 is very simple, it provides you all the needed base classes which you need to inherit from. Let's start implementing step by step each control.

Step 1: Editor

Build a class that inherits from "Microsoft.SharePoint.WebControls.EntityEditorWithPicker". After that you have to provide the type of the dialog (step 2) in the "PickerDialogType" property. Then, provides the separator char in the "EntitySeparator" property.

See below the Editor:

SharePointDialogPicker

Step 2: Dialog

Build a class that inherits from "Microsoft.SharePoint.WebControls.PickerDialog". This base class is responsible to provide results that matches with the entered text provided in the search input.

See below the dialog:

SharePointDialog

The base class constructor has 3 parameters:

  1. Query (Step 3) contains the logic for retrieving data
  2. A Control that display the result set
  3. An instance of the Editor (Step 1)

Step 3: Query

Build a class that inherits from "Microsoft.SharePoint.WebControls.SimpleQueryControl". In this class, you have to override the method "IssueQuey" which will contains the logic for retrieving Data, it must be in a "System.Data.DataTable". And sets it to the PickerDialog's Results property. Don't forget to return the row count. Otherwise, no result are displayed.

In addition, override the method "GetEntity" that has a "System.Data.DataRow" parameter. This Row is a DataTable you have provided before. The goal is this method in to Strongly Typed your result with the "Microsoft.SharePoint.WebControls.PickerEntity" object. Which you can specify a Key, DisplayText. Then, the "IsResolved" property to true. This ensures that the provided entity is correct.

See blow the output of the Dialog (Step 2) that populates data corresponding to the entered input text:

SharePointPickerEntityResolved

When click on the OK button, the editor will receive the Entity value separated by the specified "EntitySeparator" if there is more than one Entity.

See the final result in the Picker Editor:

SharePointPickerEditorResult

Hope it helps.

Published Friday, October 19, 2007 12:40 AM by avalonboy
Filed Under: ,

Comments

 

people » Build your own SharePoint 2007 Picker Dialog said:

October 21, 2007 8:28 AM
 

.neting in the free world said:

O co chodzi? Pierwsza część nazwy jest chyba zrozumiałą, zwykłe pole lookup, które umożliwia pobieranie
September 14, 2008 5:25 PM
 

SharePiont field with custom picker | keyongtech said:

January 18, 2009 9:38 AM
 

Rd250 New Strada Cadence, Order Rd250 said:

May 20, 2010 12:54 PM
 

Liberty Mutual Car Insurance, Liberty Mopar Fog Light Kit said:

May 21, 2010 12:44 AM
 

Headlight 2005 Chrysler Pacifica Halogen, Episode Floor Mats Chrysler Pacifica said:

May 21, 2010 2:24 AM
 

Elephant Bar Restaurant Mirada, Mirada Taillight Used Dodge Ram 1500 said:

May 21, 2010 3:51 AM
 

Rio5 Fog Lights, Rio5 Affordable said:

May 21, 2010 12:03 PM
 

Las Vegas Part Phone Number, Somerset House Motel Las Vegas Deals said:

May 21, 2010 6:55 PM
 

Amazon Es300, Es300 Specs Lexus Es said:

May 21, 2010 8:02 PM
 

Cls55 Aftermarket, Cls55 Amg Replacement Universal said:

May 21, 2010 8:55 PM
 

Forenza Discount Old Navy, Forenza 2nd Hand New Suzuki said:

May 22, 2010 1:48 AM
 

Wagoneer Tube Exhaust, Wagoneer Taillight Brain said:

May 22, 2010 7:53 AM
 

Lw300 Casio Steel Case, W300 Bulb Auto Parts Body said:

May 22, 2010 11:28 AM
 

325ix Automotive 1990 Bmw, 325ix Adoption Bmw Series Alfa Romeo 156 - 495.ja3ra.com said:

May 23, 2010 5:30 AM
 

1995 Cadillac Deville On 22, 1990 Cadillac Deville Wiki - 414.rkwrh.com said:

May 23, 2010 12:49 PM
 

Tucson Parts Order Antenna Mast, Pella Windows Doors Tucson Az - 63.renters.ws said:

May 24, 2010 4:30 AM
 

2002 Jetta Clutch, 2005 Volkswagen Jetta 2.5 - 229.codebluehacks.org said:

May 24, 2010 6:09 AM
 

Sweater Columbia Prices Buy, Paintball Fields Columbia Sc - 253.cmanager.org said:

May 24, 2010 6:26 AM
 

Gmc R3500 Sale Classified Directory, Automotive R3500 Envoy Xuv - 71.cmanager.org said:

May 24, 2010 6:39 AM
 

Touareg Auto Being, Touareg Diesel Male - 191.rkwrh.com said:

May 24, 2010 7:05 AM
 

Ramcharger Used Srt 4 Dodge Grand Caravan, 2004 Grand Am Brakes Replacement - 50.tgrconversions.com said:

May 24, 2010 8:39 AM
 

Check Engine Light Mercedes E500, E Class Muffler E500 - 326.binggreen.com said:

May 24, 2010 3:31 PM
 

Sale 500sl 240d Mercedes Benz 380sl, 380sl Lamp Coupe 1984 Mercedes Benz - 9.rkwrh.com said:

May 24, 2010 4:18 PM
 

D400 Removal Grounding Strap, D400 Sale Intel Pentium M Laptop - 174.eumreborn.com said:

May 25, 2010 12:24 AM
 

Promo 1993 Pontiac Firebird Trans Am, 1979 Firebird Sale - 465.tgrconversions.com said:

May 25, 2010 1:43 AM
 

R150 Headlight Ng, 1993 Chevy 1500 - 52.renters.ws said:

May 25, 2010 4:23 AM
 

C55 Full C32 Amg, C32 Part Discount 2002 Mercedes Benz - 96.akemet.com said:

May 25, 2010 1:54 PM
 

L300 3 Part Marine Engines Used Transmissions, Cooling System Assembly Saturn L300 - 483.zapstreaming.com said:

May 25, 2010 3:33 PM
 

2000 - 1991 @ Used Kia Spectra5 Free, Spectra5 Specs Used Kia - 437.eumreborn.com said:

May 27, 2010 6:02 AM
 

sandiegocarinsurance said:

June 11, 2010 4:20 PM
Anonymous comments are disabled

This Blog

Post Calendar

<October 2007>
SuMoTuWeThFrSa
30123456
78910111213
14151617181920
21222324252627
28293031123
45678910

Syndication

Powered by Community Server, by Telligent Systems