Last change
on this file since 2282 was
2282,
checked in by mylan, 14 years ago
|
Hide UID column
|
-
Property svn:eol-style set to
native
|
File size:
814 bytes
|
Line | |
---|
1 | from AccessControl import ClassSecurityInfo |
---|
2 | from Globals import InitializeClass |
---|
3 | from Products.DataGridField.Column import Column |
---|
4 | |
---|
5 | class HiddenColumn(Column): |
---|
6 | """ Column with non-changeable text |
---|
7 | |
---|
8 | Useful with DataGridField.fixed_row property in some use cases. |
---|
9 | """ |
---|
10 | security = ClassSecurityInfo() |
---|
11 | |
---|
12 | def __init__(self, label, default=None, label_msgid=None, visible=True): |
---|
13 | """ Create a column |
---|
14 | |
---|
15 | @param hide Hide column from displaying |
---|
16 | """ |
---|
17 | Column.__init__(self, label, default, label_msgid) |
---|
18 | self.visible = visible |
---|
19 | |
---|
20 | security.declarePublic('getMacro') |
---|
21 | def getMacro(self): |
---|
22 | """ Return macro used to render this column in view/edit """ |
---|
23 | return "datagrid_hidden_cell" |
---|
24 | |
---|
25 | # Initializes class security |
---|
26 | InitializeClass(HiddenColumn) |
---|
Note: See
TracBrowser
for help on using the repository browser.