Skip to content

Instantly share code, notes, and snippets.

@jjulian
Created February 24, 2010 20:42
Show Gist options
  • Save jjulian/313826 to your computer and use it in GitHub Desktop.
Save jjulian/313826 to your computer and use it in GitHub Desktop.
Minimal Ext JS Viewport example
<html>
<head>
<link rel="stylesheet" href="ext-3.1.1/resources/css/ext-all.css" />
<script src="ext-3.1.1/adapter/ext/ext-base.js"></script>
<script src="ext-3.1.1/ext-all-debug.js"></script>
<script>
Ext.BLANK_IMAGE_URL = 'ext-3.1.1/resources/images/default/s.gif';
// ...your grid code...
//grid.render('grid-example'); <- do not render the grid, the viewport will do this for you
Ext.onReady(function(){
var viewport = new Ext.Viewport({
layout: 'fit',
items: [grid]
});
});
</script>
</head>
<body></body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment