Nimekuwa kazi juu ya nini Natumaini itakuwa hivi karibuni-iliyotolewa CodePlex mradi ambao hutoa nzuri jumuishi kidogo ya sehemu ya mtandao kuzungumza na kila mmoja kupitia uhusiano mtoa / matumizi kwa madhumuni ya kuchunguza tovuti SharePoint chini ya inashughulikia. (Hii ina shaka kufanyika kabla, lakini huu ni mradi wa kujifunza kama mengi kama kitu kingine chochote). Hii ni maana ya kuwa badala ya madirisha Explorer mtazamo wa SharePoint 2010 hati maktaba.
kanuni ina kawaida ya kujirudia wito chini ya SPWeb na SPLists kutoka hatua ya kutolewa kuanzia. kitu kwamba hana apitaye kwamba wote hujenga kamba XML kwamba inaonekana kitu kama hiki:
<sitecollection url =’http://demo2010a:9090′>
<mtandao
title = 'Aisee Dunia Sandbox'
Kigezo = 'tovuti kwa ajili ya timu ya haraka kuandaa, mwandishi, na kushiriki habari, Blah blah blah '><orodha
title = 'BCC_Health_Services_FAQs’
Kigezo = 'CustomList’
listid =’http://demo2010a:9090/helloworldsandbox[kushiriki]1e02b001-3cb2-4f17-b63d-7809e86b4174′>
</orodha><orodha
title = 'BCC_Notifications'
Kigezo = 'CustomList'
listid =’http://demo2010a:9090/helloworldsandbox[kushiriki]5a5a13d1-877c-41c0-9063-b9612be80d5e’>
</orodha></mtandao>
</sitecollection>
Nategemea ya kusafisha kwamba XML kabla ya yote yanayosemwa na kufanyika.
Nataka hatimaye kupata taarifa juu na katika kudhibiti TREEVIEW. Si hasa nchi kuvunja mambo.
Changamoto mimi alichukua hapa ilikuwa kuunganisha mtazamo mti na XML Takwimu Chanzo kudhibiti badala ya manually kujenga treenodes yangu kama mimi tembeeni mti. Mimi hii sehemu kwa sababu mimi nina makusudi kufanya mambo magumu juu ya mwenyewe (huu ni mradi kujifunza baada ya yote) na sehemu kwa sababu nina wazo hili utata kwamba kujenga nodes mti kama mimi tembeeni mti si wazo nzuri kwa muda mrefu.
tatizo na mfumo huu ni kwamba kudhibiti TREEVIEW hajui kuhusu sifa nzuri juu ya nodes kuvutia kama "orodha" au "mtandao" hivyo inaonyesha hii pato na default:
Hiyo si muhimu. Hii ni ambapo darasa TreeNodeBinding husaidia. Naweza kutumia hii kuwaambia kudhibiti TREEVIEW jinsi ni lazima kutafsiri XML. Hapa ni mfano:
TNB = mpya TreeNodeBinding();
tnb.DataMember = "list"; // Hii ni katika studio xml kwa ajili ya tovuti.
tnb.TargetField = "listid";
tnb.ValueField = "title";
tnb.ToolTipField = "Template";
Kisheria hii anaelezea TREEVIEW kwamba wakati hupata <orodha> nodi katika XML, kuomba bindings kwa TargetField, ValueField na ToolTipField. May katika programu, ramani hizo kama ifuatavyo:
- TargetField: Wakati mtu Clicks juu ya thamani ya nodi, hii ni nini utapata kwa SelectedNode.Value. Hii si kwa kuchanganyikiwa na ...
- ValueField: Hii ni nini unataka TREEVIEW kuonyesha kwa mtumiaji.
- ToolTipField: thamani kutoka XML kwamba unataka kama Tooltip.
Kuongeza kwamba TreeNodebinding kwa DataBindings maoni ya mti na kupata pato kama hii:
Mimi itabidi zaidi juu ya haya yote kama mimi kuendelea juu ya mradi na hatimaye kuweka hii juu ya Codeplex.
</mwisho>
Kufuata yangu juu ya Twitter kwa http://www.twitter.com/pagalvin
Pingback: Tweets that mention Working With TreeNodeBinding in the ASP.NET Treeview Control « Paul Galvin's SharePoint Space -- Topsy.com
Hi Paulo,
I just checked that myself. It worked as far as you described that even if I don’t get that information from your site (what a pity :-)).
The point I am interested in is, I tried to make the structure lazy loading with the PopulateOnDemand property. Otherwise the treeview load the complete structure in a whole which I would like to avoid. This property PopulateOnDemand seems not to have any effect.
Also the treeview does not save any expand/ collapse state information.
Did you solve these issues?
Regards
Holger
I know you posted this comment a long time ago. Sorry for never responding. I assume that you got your solution long since :).