reportCommentsGrid = function() {
	var colSelect = new Ext.grid.SelectColumn();
	var columns = [
	colSelect,
	{
		header: "Comment",
		sortable: true,
		dataIndex: 'comment'
	},
	{
		header: "Type",
		sortable: true,
		dataIndex: 'type',
		width: 100
	},
	{
		header: "Favorite",
		sortable: true,
		dataIndex: 'favorite',
		width: 100
	}];
	reportCommentsGrid.superclass.constructor.call(this, {
		store: new Ext.data.Store({
			url: 'teacher_tools/reportcomments_data.json.php',
			baseParams: {
				command: 'getComments'
			},
			reader: new Ext.data.JsonReader({
				root: 'getComments'
			}, [{
				name: 'select'
			},
			{
				name: 'comment'
			},
			{
				name: 'type'
			},
			{
				name: 'favorite'
			}]),
			autoLoad: false
		}),
		title: 'Comments',
		columns: columns,
		plugins: [colSelect],
		border: true,
		layout: 'fit',
		autoScroll: true
	});
}
Ext.extend(reportCommentsGrid, Ext.grid.EditorGridPanel);

