Exemple #1
0
        public override void ConfigureColumns(ColumnConfiguration columnConfig)
        {
            columnConfig.AddStringColumn("Name", "UserName");
            columnConfig.AddStringColumn("Email", "Email");
            columnConfig.AddBooleanColumn("Email Confirmed", "EmailConfirmed", "Yes", "No");
            columnConfig.AddLinkColumn("", "Id", "Send Confirmation Email", EventNumber.SendConfirmationEmail,
                                       new ShowHideColumnSetting()
            {
                Display    = ColumnDisplayType.Hide,
                Conditions = new List <Condition>()
                {
                    new Condition("EmailConfirmed", Comparison.Equals, "true")
                }
            }
                                       );

            columnConfig.AddLinkColumn("", "Id", "Edit", EventNumber.EditUser);

            columnConfig.AddButtonColumn("", "Id", "X",
                                         new UserConfirmation("Delete User?")
            {
                OnConfirmationUIAction = EventNumber.DeleteUser
            },
                                         new ShowHideColumnSetting()
            {
                Display    = ColumnDisplayType.Show,
                Conditions = new List <Condition>()
                {
                    new Condition("CanDelete", Comparison.Equals, "true")
                }
            }
                                         );
        }