WalkThrough SharePoint WebPart ???? ? - PowerPoint PPT Presentation

Loading...

PPT – WalkThrough SharePoint WebPart ???? ? PowerPoint presentation | free to download - id: 3f5bd7-NTNiM



Loading


The Adobe Flash plugin is needed to view this content

Get the plugin now

View by Category
About This Presentation
Title:

WalkThrough SharePoint WebPart ???? ?

Description:

WalkThrough SharePoint WebPart blog.joycode.com Kaneboy [MS MVP] WalkThrough – PowerPoint PPT presentation

Number of Views:144
Avg rating:3.0/5.0
Slides: 16
Provided by: kane80
Learn more at: http://files.cnblogs.com
Category:

less

Write a Comment
User Comments (0)
Transcript and Presenter's Notes

Title: WalkThrough SharePoint WebPart ???? ?


1
WalkThrough SharePoint WebPart ???? ?
  • blog.joycode.com

Kaneboy MS MVP
?????WalkThrough?????????,????????? Thanks.
2
?WalkThrough???
  • ???WebPart??????(Connectable WebPart)

3
????
  • ??WebPart???????,????WalkThrough????4???WalkThroug
    h??????????(???)??????

4
????Connectable WebPart
Provider WebPart
Consumer WebPart
??????????? ????(Cell) ????(Row) ??????(List) ???
??(Filter) ??(Parameters)
ICellProvider IRowProvider IListProvider IFilte
rProvider IParametersInProvider IParametersOutPr
ovider
ICellConsumer IRowConsumer IListConsumer
IFilterConsumer IParametersInConsumer IParamete
rsOutConsumer
??WebPart???????
??WebPart???????
? Provider WebPart????????Provider?? ? Consumer
WebPart????????Consumer?? ? Provider???Consumer??(
??Transformer)???????? ? ????????????WebPart??????
?
5
????Provider WebPart(?)
?VS.NET????????Web Part Library,???SampleWebPar
t???? ?VS.NET?????WebPart1( WebPart1.cs?
WebPart1.dwp)??? ???,????Provider Web
Part,???CityProvider
6
????Provider WebPart(?)
?????,VS.NET?????CityProvider???Microsoft.SharePoi
nt.WebPartPages.WebPart??,????ICellProvider??????I
CellPrivider?WebPart???????WebPart?????
??????EnsureInterfaces()???,?????????RegisterIn
terface()??(??8???)???,????? RegisterInterface
("CellProvider_WPQ_", "ICellProvider", WebPart.Unl
imitedConnections, ConnectionRunAt.Server, this, "
CellProviderInterface_WPQ_", ?????????", ??????
????????")
7
????Provider WebPart(?)
?CityProvider?????????? private DropDownList
cityList new DropDownList() ?????OnLoad()??,
?????????? protected override void
OnLoad(EventArgs e) if (cityList.Items.Count
0) cityList.DataSource new String
??, ??, ??" cityList.DataBind()
this.Controls.Add( cityList )
cityList.AutoPostBack true ????RenderWebPar
t()???,???????????? protected override void
RenderWebPart(HtmlTextWriter output)
cityList.RenderControl(output)
8
????Provider WebPart(?)
????PartCommunicationMain()??????????,??????????
?????????????? public override void
PartCommunicationMain() if (CellReady !
null) // ??????????
CellReadyEventArgs cellReadyArgs new
CellReadyEventArgs() cellReadyArgs.Cell
cityList.SelectedItem.Text //
??CellReady????,????????? CellReady( this,
cellReadyArgs )
9
????Consumer WebPart(?)
???,????Consumer Web Part,???CityConsumer
10
????Consumer WebPart(?)
?????,VS.NET?????CityConsumer???Microsoft.SharePoi
nt.WebPartPages.WebPart??,????ICellConsumer??????I
CellConsumer?WebPart?????WebPart???????
??????EnsureInterfaces()???,?????????RegisterIn
terface()??(??8???)???,????? RegisterInterface
("CellConsumer_WPQ_", "ICellConsumer", WebPart.
LimitOneConnection, ConnectionRunAt.Server, this,
"CellConsumer_WPQ_", "?...?????????", "???????????
???")
11
????Consumer WebPart(?)
????CellReader()???,??Provider
WebPart???????,?????????Text?? public void
CellReady(object sender, CellReadyEventArgs
cellReadyArgs) if(cellReadyArgs.Cell !
null) Text "?????"
cellReadyArgs.Cell.ToString()
??CellReady()????SharePoint?????(??????)Pro
vider WebPart?CellReady??,?????????Provider
WebPart????????CellReady?????? ????????CityConsu
mer?,VS.NET???????Text??,??Text?????RenderWebPart
()???????????????????????
12
?????WebPart??????
???,????????Dwp????,?????CityProvider.dwp?CityC
onsumer.dwp?????????Dwp?????
lt?xml version"1.0" encoding"utf-8"?gt ltWebPart
xmlns"http//schemas.microsoft.com/WebPart/v2"
gt ltTitlegtCityProviderlt/Titlegt
ltDescriptiongt?????????WebPartlt/Descriptiongt
ltAssemblygtSampleWebPartlt/Assemblygt
ltTypeNamegtSampleWebPart.CityProviderlt/TypeNamegt lt/
WebPartgt lt?xml version"1.0" encoding"utf-8"?gt
ltWebPart xmlns"http//schemas.microsoft.com/WebPa
rt/v2" gt ltTitlegtCityConsumerlt/Titlegt
ltDescriptiongt?????????WebPartlt/Descriptiongt
ltAssemblygtSampleWebPartlt/Assemblygt
ltTypeNamegtSampleWebPart.CityConsumerlt/TypeNamegt lt/
WebPartgt
13
?????????WebPart
???WebPart????????,?????????????????,?????????????
?? ??????????????,???????,????????????
???,??CityProvider WebPart????????,??????????????
?CityConsumer,????WebPart?????? ??,?????CityCon
sumer WebPart????????,????????????????CityProvid
er,?????????????????
14
?????WebPart???
???,???WebPart??????,CityConsumer??????CityProvide
r????????,?????????????
?CityProvider??????????????
????CityConsumer??????????????????
15
???To Be Continued
blog.joycode.com
Kaneboy MS MVP
About PowerShow.com