Inheritance: System.EventArgs
コード例 #1
0
 protected virtual void OnItemDataBound(AccordionItemEventArgs args)
 {
     if (ItemDataBound != null)
     {
         ItemDataBound(this, args);
     }
 }
コード例 #2
0
 protected virtual void OnItemCreated(AccordionItemEventArgs args)
 {
     if (ItemCreated != null)
     {
         ItemCreated(this, args);
     }
 }
コード例 #3
0
    protected void accordion_ItemDataBound(object sender, AjaxControlToolkit.AccordionItemEventArgs e)
    {
        if (e == null)
        {
            throw new ArgumentNullException(nameof(e));
        }

        if (e.ItemType == AjaxControlToolkit.AccordionItemType.Content)
        {
            Controls_ChecklistControls_ChecklistItem ckli = (Controls_ChecklistControls_ChecklistItem)LoadControl("~/Controls/ChecklistControls/ChecklistItem.ascx");
            e.AccordionItem.Controls.Add(ckli);
            ckli.NoHeader = true;
            ckli.DataItem = ((ContainerRow)e.AccordionItem.DataItem);
        }
    }
コード例 #4
0
    protected void Accordion2_ItemDataBound(object sender, AccordionItemEventArgs e)
    {
        if (e.ItemType == AccordionItemType.Content)
        {
              Repeater r1 = e.AccordionItem.FindControl("Repeater1") as Repeater;
              Repeater r2 = e.AccordionItem.FindControl("Repeater2") as Repeater;

              SqlDataSource sd1 = e.AccordionItem.FindControl("AdjustmentViewDataSource1") as SqlDataSource;
              SqlDataSource sd2 = e.AccordionItem.FindControl("AdjustmentViewDataSource2") as SqlDataSource;

              r1.DataSource = sd1;
              r2.DataSource = sd2;

              r1.DataBind();
              r2.DataBind();
        }
    }
コード例 #5
0
        /// <summary>
        /// Create an AccordionPane's item (either Header or Content) and raise the ItemCreated event
        /// </summary>
        /// <param name="dataItem">Item's data</param>
        /// <param name="index">Index</param>
        /// <param name="itemType">Type of the item (Header or Content)</param>
        /// <param name="container">Control to fill</param>
        /// <param name="template">Template for the binding</param>
        /// <param name="dataBind">Whether or not to bind</param>
        private void CreateItem(object dataItem, int index, AccordionItemType itemType, AccordionContentPanel container, ITemplate template, bool dataBind)
        {

            if (template == null)
                return;

            AccordionItemEventArgs itemArgs = new AccordionItemEventArgs(container, itemType);
            OnItemCreated(itemArgs);

            container.SetDataItemProperties(dataItem, index, itemType);
            template.InstantiateIn(container);

            if (dataBind)
            {
                container.DataBind();
                OnItemDataBound(itemArgs);
            }
        }
コード例 #6
0
ファイル: Accordion.cs プロジェクト: pjeconde/CedServicios
 /// <summary>
 /// Raise the ItemDataBound event
 /// </summary>
 /// <param name="args">EventArgs</param>
 protected virtual void OnItemDataBound(AccordionItemEventArgs args)
 {
     if (ItemDataBound != null)
         ItemDataBound(this, args);
 }
コード例 #7
0
ファイル: Accordion.cs プロジェクト: pjeconde/CedServicios
 /// <summary>
 /// Raise the ItemCreatedEvent
 /// </summary>
 /// <param name="args">EventArgs</param>
 protected virtual void OnItemCreated(AccordionItemEventArgs args)
 {
     if (ItemCreated != null)
         ItemCreated(this, args);
 }
コード例 #8
0
ファイル: Accordion.cs プロジェクト: pjeconde/CedServicios
        /// <summary>
        /// Create an AccordionPane's item (either Header or Content) and raise the ItemCreated event
        /// </summary>
        /// <param name="dataItem">Item's data</param>
        /// <param name="index">Index</param>
        /// <param name="itemType">Type of the item (Header or Content)</param>
        /// <param name="container">Control to fill</param>
        /// <param name="template">Template for the binding</param>
        /// <param name="dataBind">Whether or not to bind</param>
        private void CreateItem(object dataItem, int index, AccordionItemType itemType, AccordionContentPanel container, ITemplate template, bool dataBind)
        {

            if (template == null)
                return;

            AccordionItemEventArgs itemArgs = new AccordionItemEventArgs(container, itemType);
            OnItemCreated(itemArgs);

            container.SetDataItemProperties(dataItem, index, itemType);
            template.InstantiateIn(container);

            if (dataBind)
            {
                container.DataBind();
                OnItemDataBound(itemArgs);
            }
        }
コード例 #9
0
 protected void MyAccordion_ItemCreated(object sender, AjaxControlToolkit.AccordionItemEventArgs e)
 {
 }