Skip to content

Instantly share code, notes, and snippets.

@grumpycatsaysno
Last active February 9, 2016 12:19
Show Gist options
  • Save grumpycatsaysno/7d2c1f751c03f11a11a3 to your computer and use it in GitHub Desktop.
Save grumpycatsaysno/7d2c1f751c03f11a11a3 to your computer and use it in GitHub Desktop.
InitializeTaxaList method
protected override void InitializeTaxaList()
{
if (this.RenderAs == RenderTaxonomyAs.HierarchicalList)
{
IDictionary<ITaxon, uint> taxaItemsCountForTaxonomy = null;
if (this.ContentId == Guid.Empty)
{
taxaItemsCountForTaxonomy = this.GetTaxaItemsCountForTaxonomy();
}
else
{
taxaItemsCountForTaxonomy = this.GetTaxaFromContentItem();
}
int taxonDataCount = 0;
List<CustomTaxonData> taxonDatas = this.CustomPrepareData(taxaItemsCountForTaxonomy);
taxonDataCount = taxonDatas.Count;
// After obtaining the data we configure and bind the tree view.
this.ConfigureTreeViewHierarchicalListControl(taxonDatas);
this.IsEmpty = taxonDataCount == 0;
if (!this.IsEmpty)
{
this.TitleLabel.Text = this.Title;
}
}
else
{
base.InitializeTaxaList();
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment