I have a grid with hidden fields and need to display all the fields in a given record that a user will select. Since the some of the fields are hidden, the are not in the view object at the time the user selects the row.
I need the column headings for those fields to display in a window that I will create onrightclick.
is there a way to use the store field name to find the column heading for it in the grid? I can't figure it out.
I need the column headings for those fields to display in a window that I will create onrightclick.
is there a way to use the store field name to find the column heading for it in the grid? I can't figure it out.
Code:
onRightClickIndexItem: function(view, record, el, index, event) { event.stopEvent(); this.currentRecord = record; this.gridcolumns = view.getGridColumns(); //<------no hidden fields in here this.gridindex = index; this.getIndexGrid().menu.showAt(event.getXY()); } I know I can get the field names by doing: var store = this.getStore('Rvabreps'); var fields = store.model.fields.keys; and then I can do a loop to get the data for (var i = 0; i < fields.length; i++) { var fieldname = fields[i]; var value = record.get(fields[i]); var fieldlabel = ?????? (grid.column.text) detailform.add({ fieldLabel: fieldlabel, value: value, xtype: 'displayfield' }); }
Comment