Hello,

I'm wondering if anyone has successfully integrated any of the following grids with RoR:

Yui-ext Grid -> http://www.jackslocum.com/yui/2006/0...extensions-v1/

dhtmlxGrid -> http://www.scbr.com/docs/products/dhtmlxGrid/

ActiveWidgets Grid -> http://www.activewidgets.com/grid.intro/

They all seem to use xml to load data into the grid - yui-ext can also accept json. All three have similar data loading methods:

Yui-ext Grid -> this.dataModel.load('/path/to/xmlFile.xml');

dhtmlxGrid -> mygrid.loadXML("/path/to/xmlFile.xml");

ActiveWidgets Grid -> table.setURL("/path/to/xmlFile.xml");

However, in Rails, with RJS, I would typically load a table/grid something like the following:

=================================================================================
index.rhtml

<table>
<thead>
<tr>
<td> columnHead1 </td>
<td> columnHead2 </td>
<td> columnHead3 </td>
</tr>
</thead>
<tbody id="grid" class="scrollingContent">

</tbody>
</table>

---------------------------------------------------

main_controller.rb
.
.
.

def load_table

@things = Thing.find(:all)

---------------------------------------------------

_table_rows.rhtml

<% @things.each do |thing| -%>

<tr>
<td>
<%= thing.attribute1 %>
</td>
<td>
<%= thing.attribute2 %>
</td>
<td>
<%= thing.attribute3 %>
</td>
</tr>

<% end %>

---------------------------------------------------

load_table.rjs

page.insert_html :bottom, 'grid', :partial => 'table_rows', :object => @things

=================================================================================

Assuming the collection were reformatted as xml (either manually or, perhaps by using the Rails ".to_xml" method), how would the data then be loaded into the grid?

Could the javascript url-related data load methods be used to call, for example, a partial? Would there be a role for RJS (... or might that be problematic because it would necessarily involve mixing libraries - prototype & xyz Grid)?

How would that work & what would the Rails code look like?

So far, I have not been able to find anything on this from a Rails perspective...

Any guidance would be much appreciatiated.

Thanks!