Search This Blog

Thursday, March 18, 2010

dojox.grid.DataGrid can't display repeat rows?

Programmer Question

We have a situations where we need to display data from a database in a grid which has repeat rows, but it seems at least the basic examples fail when the cell data is exactly the same with Sorry, an error occurred. An example follows.



        
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/dojo/1.3/dojo/dojo.xd.js"
djConfig="parseOnLoad: true">
</script>

<script>
dojo.require("dojo.data.ItemFileWriteStore");
dojo.require("dojox.grid.DataGrid");

var historyData = {
'identifier': 'time',
'label': 'time',
'items': [

{
'message': 'Please turn in your TPS reports immediately',
'time': 'March 3 2010 7:20 AM',
'sentBy':'Bill Lumbergh'

},
{
'message': 'Please turn in your TPS reports immediately',
'time': 'March 3 2010 7:20 AM',
'sentBy':'Bill Lumbergh'

}]
};

var historyGridLayout = [
[{
field: "message",
name: "Message"
},
{
field: "time",
name: "Display Date & Time"
},
{
field: "sentBy",
name: "Sent By"
}]];

</script>

<body class="tundra ">
<div dojoType="dojo.data.ItemFileWriteStore" data="historyData" jsId="historyStore">
</div>
<div id="grid" dojoType="dojox.grid.DataGrid" store="historyStore" structure="historyGridLayout">
</div>
</body>


Help!



Find the answer here

No comments:

Post a Comment

Related Posts with Thumbnails