GithubHelp home page GithubHelp logo

dynamic_grids's Introduction

DynamicGrids(wando)
============

#在你的Gemfile 添加上composite_primary_keys
gem 'composite_primary_keys', '=3.1.0'
#获取需要的辅助插件
plugins provider

#创建dynamic_grid 需要用到的数据
rails generate create_dynamic_grid


#添加必要的Js文件到application中
<%= javascript_include_tag 'dynamic_grids_js/dynamic_grids.js' %>	


#ExtJs 文件中的使用方式:
  var grid = new Wando.grid.DynamicGridPanel({ 
      storeUrl: 'controllers/actions',
      columnsConfig: {
         header_column_name: {width: 1000, renderer: some_render_action } #example
      },
  })

#Rails controller 使用方式:
  def dynamic_grids
    dynamic_grids Model,grid_name,option
  end

#跨表获取字段,倘若在需要获取的表头项不在表内,请参考provider使用方式来赋值Headers的index
order 表
Order(id: integer, name: string)  
order_item 表
order_item(id: integer, order_id: integer, name: string)
#通过order需要获取order_item的name,header的写法 
Header.create(:index => "order_item/name")


Example
=======

Example goes here.

Copyright (c) 2011 [name of plugin creator], released under the MIT license

dynamic_grids's People

Contributors

mouse-lin avatar

Stargazers

 avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.