Example #1
0
        public UsersGridRow(UsersGrid grid)
            : base(grid)
        {
            UsersGrid = grid;

            Name = new GridPlainTextCell(this, grid.UsersColumns.Name);
            Password = new GridPasswordTextCell(this, grid.UsersColumns.Password);
            FullName = new GridPlainTextCell(this, grid.UsersColumns.FullName);
            UserRoleId = new GridListCell(this, grid.UsersColumns.UserRoleId);

            cells = new GridCell[] { Name, Password, FullName, UserRoleId };
        }
        public UsersGridColumnCollection(UsersGrid grid)
            : base(grid)
        {
            UsersGrid = grid;

            Name = new GridPlainTextColumn(this, "Name") { MaxLength = User.Lengths.Name.ToDefaultString() };
            Password = new GridPasswordTextColumn(this, "Password") { MaxLength = User.Lengths.Password.ToDefaultString() };
            FullName = new GridPlainTextColumn(this, "FullName") { MaxLength = User.Lengths.FullName.ToDefaultString() };
            UserRoleId = new GridListColumn(this, "UserRoleId") { DefaultCellValue = ((int)Session.UserRole.User).ToDefaultString()};

            Items = new GridColumn[] { Name, Password, FullName, UserRoleId };
        }