PDA

View Full Version : Sample of Editable Grid



JJunatas
31 Oct 2006, 9:46 AM
Hi Jack.

Can you help me get started?. I have already twice to cobble together all the javascripts/css files necessary to bring up an editable grid but I don't see any grid showing up. My latest attempt is below:


<Page>

<DOCTYPE>

<html>
<head>

<title>Untitled Page</title>

<link>

<script></script>
<script></script>
<script></script>
<script></script>
<script></script>
<script></script>
<script></script>
<script></script>
<script></script>
<script></script>
<script></script>
</head>

<body>

<form>
<div>
</div>
</form>

<script>

var myData =
[
["AAAA"],
["BBB"]
];

var dataModel = new YAHOO.ext.grid.DefaultDataModel(myData);

var yg = YAHOO.ext.grid;
var cols = [{
header: "Common",
width: 120,
editor: new yg.TextEditor()
}];
var colModel = new YAHOO.ext.grid.DefaultColumnModel(cols);

this.grid = new YAHOO.ext.grid.Grid('div1', dataModel, colModel);
this.grid.render();

</script>

</body>
</html>

Thank you sharing your expertise.

hcristea
31 Oct 2006, 10:01 AM
hi,

check this post: http://www.jackslocum.com/forum/viewtopic.php?t=449

there i have a code sample which works. (read the whole post)