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/08/30/a-grid-component-for-yahoo-ui-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!
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Ruby on Rails: Spinoffs" group.
To post to this group, send email to
rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-spinoffs?hl=en
-~----------~----~----~----~------~----~------~--~---
A lot has changed since the halcyon days of March 2006, but this might actually provide a Rails-centric example for you to iterate from: http://unspace.ca/discover/datagrid/ Hope that helps. Pete On 4-Nov-06, at 9:21 PM, rmarmer1 wrote:> > 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/08/30/a-grid-component-for-yahoo- > ui-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! > > > >Pete Forde: Partner at Unspace Interactive contact | pete-oWFMc0dWE16w5LPnMra/2Q@public.gmane.org - 416.548.8444 --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Spinoffs" group. To post to this group, send email to rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs?hl=en -~----------~----~----~----~------~----~------~--~---
Hey Pete, Thanks so much for your reply & for the datagrid you put together. At this point, however, the type of datagrid I need is probabaly less involved with regard to updating specific values & more in need of headers, sorting & scrolling. The yui-ext, & other grids I mentioned are quite nice & full-featured along these lines, but I just can''t figure out how to get ActiveRecord data into them. In the meantime I am trying to adapt the dhtml table I found at http://www.dhtmlgoodies.com/index.html?showDownload=true&whichScript=table_widget to my purposes. I have searched the internet extensively for information & examples of their use with Rails, and I have posted in variety of forums... but have come up short so far. In any event, if/when I learn how to get data from Rails into any of those grids, I''ll post the answer. Thanks again. Randy Pete Forde wrote:> A lot has changed since the halcyon days of March 2006, but this > might actually provide a Rails-centric example for you to iterate from: > > http://unspace.ca/discover/datagrid/ > > Hope that helps. > > Pete > > On 4-Nov-06, at 9:21 PM, rmarmer1 wrote: > > > > > 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/08/30/a-grid-component-for-yahoo- > > ui-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! > > > > > > > > > Pete Forde: Partner at Unspace Interactive > contact | pete-oWFMc0dWE16w5LPnMra/2Q@public.gmane.org - 416.548.8444--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Spinoffs" group. To post to this group, send email to rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs?hl=en -~----------~----~----~----~------~----~------~--~---
Am 05.11.2006 um 07:48 schrieb Pete Forde:> A lot has changed since the halcyon days of March 2006...weren''t the halcyon days way back in early 2005...? :) best, thomas --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Spinoffs" group. To post to this group, send email to rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs?hl=en -~----------~----~----~----~------~----~------~--~---