Flat Taxonomy and MVC Widget Designer
I'm using Sitefinity 6.3. I need the end user of my widget to be able to select a taxon from a custom flat taxonomy, via the widget designer. I'd like to use the FlatTaxonField control.
1) Create a virtual reference to the FlatTaxonField control, in my case the get method of the virtual HierarchicalTaxonField LIstingCats returns
2) Create a virtual reference to the TaxonSelector, in my case:
return this.ListingCats.Controls.Controls.Controls.Controls.FindControl("expandTarget_write").FindControl("taxaSelector_write") as HierarchicalTaxonSelector;
3) Create a virtual reference to the RadTreeView, in my case
return this.ListingCatsHierarchicalTaxonSelector.Controls.Controls.FindControl("treePanel").FindControl("taxaTree") as RadTreeView;
4) Attach a client-side onload handler to the RadTreeView:
this.ListingCatsTaxaTree.OnClientLoad = "rtvLoad";
for (var i = 0; i < lcSelectedIds.length; i++)
var selNode = rtvTaxaTree.findNodeByValue(lcSelectedIds[i]);
That'll do it. Sorry about the code, but I can't insert it without creating a royal mess, so I just tried to give you the gist.
Of course, now that I've posted this Herculean procedure a Telerik developer will answer with a simple method call or something.