/// <summary>
        /// Binds the custom fields.
        /// </summary>
        private void BindCustomFields()
        {
            //check if we are editing the sub grid - needed to fire update command on the nested grid.
            if (ViewState["EditingSubGrid"] == null)
            {
                grdCustomFields.DataSource   = UserCustomFieldManager.GetAll();
                grdCustomFields.DataKeyField = "Id";
                grdCustomFields.DataBind();

                grdCustomFields.Visible = grdCustomFields.Items.Count != 0;
            }
        }
Esempio n. 2
0
        /// <summary>
        /// Handles the Load event of the Page control.
        /// </summary>
        /// <param name="sender">The source of the event.</param>
        /// <param name="e">The <see cref="System.EventArgs"/> instance containing the event data.</param>
        protected void Page_Load(object sender, EventArgs e)
        {
            //need to rebind these on every postback because of dynamic controls
            ctlUserCustomFields.DataSource = UserCustomFieldManager.GetAll();
            ctlUserCustomFields.DataBind();

            if (Page.IsPostBack)
            {
                return;
            }

            ResetForNewUser();
        }