예제 #1
0
        protected void Page_Load(object sender, EventArgs e)
        {
            WBTaxonomy recordsTypes = WBTaxonomy.GetRecordsTypes(SPContext.Current.Site);

            TreeViewTermCollection collection = new TreeViewTermCollection();

            collection.Add(new TreeViewTerm(recordsTypes.TermSet));

            PickRecordsTypeTreeView.DataSource = collection;
            PickRecordsTypeTreeView.DataBind();


            ShowResults.AllowSorting = true;
            ShowResults.Sorting     += new GridViewSortEventHandler(ShowResults_Sorting);

            ShowResults.AllowPaging                   = true;
            ShowResults.PageIndexChanging            += new GridViewPageEventHandler(ShowResults_PageIndexChanging);
            ShowResults.PagerSettings.Mode            = PagerButtons.Numeric;
            ShowResults.PagerSettings.Position        = PagerPosition.Bottom;
            ShowResults.PagerSettings.PageButtonCount = 10;
            ShowResults.PagerSettings.Visible         = true;
            ShowResults.PageSize = 10;

            // this odd statement is required in order to get the pagination to work with an SPGridView!
            ShowResults.PagerTemplate = null;
        }
예제 #2
0
        protected void Page_Load(object sender, EventArgs e)
        {
            SPSite site = SPContext.Current.Site;

            teams           = WBTaxonomy.GetTeams(site);
            functionalAreas = WBTaxonomy.GetFunctionalAreas(teams);

            functionalAreas.InitialiseTaxonomyControl(TeamFunctionalAreas, "Select Functional Area(s)", true, false, this);


            if (!IsPostBack)
            {
                TreeViewTermCollection collection = new TreeViewTermCollection();
                collection.Add(new TreeViewTerm(teams.TermSet));

                // Bind the data source to your collection
                AllTeamsTreeView.DataSource = collection;
                AllTeamsTreeView.DataBind();
            }
        }