Пример #1
0
        /* protected void InsertBellowClick(object sender, EventArgs e)
         * {
         *   if (InsertBellow != null)
         *   {
         *       InsertBellow(this, e);
         *   }
         * }*/

        protected void RemoveClick(object sender, EventArgs e)
        {
            if (RowIdList.Count > 1)
            {
                int index = this.PlaceHolder1.Controls.Count;
                PlaceHolder1.Controls.RemoveAt(index - 1);
                RowIdList.RemoveAt(index - 1);
            }
        }
Пример #2
0
        //public event EventHandler InsertAbove;
        //public event EventHandler InsertBellow;
        //public event EventHandler Remove;

        protected void InserAboveClick(object sender, EventArgs e)
        {
            if (RowIdList.Count < 10)
            {
                int        id = GetNewId();
                RowControl r  = CreateRow(id);
                r.setPersonDropDown();
                int index = this.PlaceHolder1.Controls.Count;
                RowIdList.Insert(index, id);
                this.PlaceHolder1.Controls.AddAt(-1, r);
            }
        }