Group Totals for my Accordian's panes

Last post 11-11-2009 6:41 PM by urpalshu. 0 replies.

Sort Posts:

  • Group Totals for my Accordian's panes

    11-11-2009, 6:41 PM
    • Member
      8 point Member
    • urpalshu
    • Member since 03-31-2005, 7:02 PM
    • Posts 43

    I am working to loop thouh my Accordion and group the Totals in each pane.

    To Achieve this I am trying to group the ClientIds and storing in a List<string>

    Please could you help with adding totals to each of my Accordion's panes.

     [CODE]

        protected List<string> GrpKeyClientIds = new List<string>();
        protected List<string> GrpQuantityClientIds = new List<string>();
        Dictionary<string, string> mydictionary = new Dictionary<string, string>();
        ArrayList myArray = new ArrayList();

    protected void accOnItemDataBound(Object sender, AjaxControlToolkit.AccordionItemEventArgs  e)
        {
          
            if (e.AccordionItem.ItemType == AjaxControlToolkit.AccordionItemType.Header)
            {
               
                Label lblGrpKey = e.AccordionItem.FindControl("lblGrpkey") as Label;

                if (lblGrpKey != null) GrpKeyClientIds.Add(lblGrpKey.ClientID);

                if (GrpQuantityClientIds != null)
                {
                    myArray.Add(GrpQuantityClientIds);
                }

            }
                   
        }

     

    protected void lvOnItemDataBound(Object sender, ListViewItemEventArgs e)
    {
        TextBox txtQuantity = e.Item.FindControl("txtQuantity") as TextBox;
        if (txtQuantity != null) QuantityClientIds.Add(txtQuantity.ClientID);

        mydictionary.Add(e.Item.ClientID, txtQuantity.ClientID);
            for(int i = 0; i< GrpKeyClientIds.Count ; i++)
            {
                if(GrpKeyClientIds[i].Contains("MyAccordion_Pane_" + i) == e.Item.ClientID.Contains("MyAccordion_Pane_" + i))
                {
                    if (txtQuantity != null) GrpQuantityClientIds.Add(txtQuantity.ClientID);
                }
            }
    }

    [/CODE]

     thanks

    urpalshu
Page 1 of 1 (1 items)