Beispiel #1
0
        private RowControl CreateRow(int id)
        {
            RowControl rval = (RowControl)LoadControl("~/NebraskaApp/Controls/RowControl.ascx");

            rval.ID    = "r_" + id;
            myRows[id] = rval;
            return(rval);
        }
Beispiel #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);
            }
        }
Beispiel #3
0
        private void CreateRows()
        {
            ArrayList ids = RowIdList;

            if (ids != null)
            {
                foreach (int id in ids)
                {
                    RowControl row = CreateRow(id);
                    row.setPersonDropDown();
                    PlaceHolder1.Controls.Add(row);
                }
            }
        }