- 浏览: 163883 次
- 性别:
- 来自: 杭州
文章分类
最新评论
-
GunChin:
有些复杂,看得不是很懂
RAILS -
shellfish:
恩,红帽默认的SELinux的级别是强制,这个一般我不大用,装 ...
华思服务器一个奇怪问题的解决方法 -
机器人:
你说得太好了了了了了了了 子 啊啊啊啊,呼啦啦。
GIT handbook -
hbxiao135:
能介绍下 fat free crm的 流程分析吗?
(CRM)customer relationship management sysetm
Add jQuery datagrids to your Rails applications
Update : added support for subgrids. Have a look at the last example!
The jQuery grid plugin
is an amazing Javascript project providing multi-functions Ajax datagrids for your web applications. With the 2dcJqgrid Rails plugin
, you can now add these datagrids to your Ruby on Rails applications with just a few lines of code.
If you don't like the look & feel of this demo, you can easily customize it using jQuery themes
.
Communications between your grids and the server will use the JSON format to exchange data.
The source code of this demo application
is available on GitHub.
This solution is compatible with most of web browsers (even Internet Explorer 6 !!).
If you have any comments or suggestions, please post them here
.
Installation
Inside your Rails application :
$ ./script/plugin install git://github.com/thoughtbot/squirrel.git
./script/generate scaffold user pseudo:string firstname:string lastname:string email:string role:string
Add some data to your migration file, you can use this one
.
Run the migration :
Open
the default layout created for you by the scaffold script
(layouts/users.html.erb) and add the required JS & CSS in the
header :
<%= jqgrid_javascripts %>
Replace the index method in your controller by this one :
def index users = User . find ( :all ) do if params [ :_search ] == " true " pseudo =~ " %#{params[:pseudo]}% " if params [ :pseudo ]. present? firstname =~ " %#{params[:firstname]}% " if params [ :firstname ]. present? lastname =~ " %#{params[:lastname]}% " if params [ :lastname ]. present? email =~ " %#{params[:email]}% " if params [ :email ]. present? role =~ " %#{params[:role]}% " if params [ :role ]. present? end paginate :page => params [ :page ], :per_page => params [ :rows ] order_by " #{params[:sidx]} #{params[:sord]} " end respond_to do | format | format . html format . json { render :json => users . to_jqgrid_json ([ :id , :pseudo , :firstname , :lastname , :email , :role ], params [ :page ], params [ :rows ], users . total_entries ) } end end
The query has been added into the controller for clarity purposes
in this demo. It's of course a better idea to create a method in your
User class. Notice how the squirrel plugin makes it easy to add filters
and pagination to our finder.
Also notice the to_jqgrid_json method, it will generate the
required JSON for you. The order of the fields in the first parameter
matters, it should be the same than the display order in your datagrid.
You are now ready to create datagrids.
Simple DataGrid with search, pagination & sorting
<script type="text/javascript">
var lastsel;
jQuery(document).ready(function(){
jQuery("#players").jqGrid({
// adding ?nd='+new Date().getTime() prevent IE caching
url:'/users?nd='+new Date().getTime(),
editurl:'',
datatype: "json",
colNames:['ID','Pseudo','Firstname','Lastname','Email','Role'],
colModel:[{name:'id', index:'id',width:35,resizable:false},{name:'pseudo', index:'pseudo'},{name:'firstname', index:'firstname'},{name:'lastname', index:'lastname'},{name:'email', index:'email'},{name:'role', index:'role'}],
pager: jQuery('#players_pager'),
rowNum:10,
rowList:[10,25,50,100],
imgpath: '/images/themes/lightness/images',
sortname: 'id',
viewrecords: true,
toolbar : [true,"top"],
sortorder: 'asc',
subGrid:false,
caption: "Football Players"
});
jQuery("#t_players").height(25).hide().filterGrid("players",{gridModel:true,gridToolbar:true});
jQuery("#players").navGrid('#players_pager',{edit:false,add:false,del:false,search:false,refresh:true})
.navButtonAdd("#players_pager",{caption:"Search",title:"Toggle Search",buttonimg:'/images/jqgrid/search.png',
onClickButton:function(){
if(jQuery("#t_players").css("display")=="none") {
jQuery("#t_players").css("display","");
} else {
jQuery("#t_players").css("display","none");
}
}
});
});
</script>
The code used to create this grid is :
<%= jqgrid (" Football Players ", " players ", " /users ", [ { :field => " id ", :label => " ID ", :width => 35 , :resizable => false }, { :field => " pseudo ", :label => " Pseudo " }, { :field => " firstname ", :label => " Firstname " }, { :field => " lastname ", :label => " Lastname " }, { :field => " email ", :label => " Email " }, { :field => " role ", :label => " Role " } ] ) %>
The first argument of the jqgrid helper is the title of your grid.
The second one is his DOM ID.
The third one is the URL used to retrieve data.
Finally, it takes an array of hashes to configure columns.
Simple DataGrid with selection link/button
<script type="text/javascript">
function handleSelection(id) {
alert('ID selected : ' + id);
}
</script><script type="text/javascript">
var lastsel;
jQuery(document).ready(function(){
jQuery("#players_2").jqGrid({
// adding ?nd='+new Date().getTime() prevent IE caching
url:'/users?nd='+new Date().getTime(),
editurl:'',
datatype: "json",
colNames:['ID','Pseudo','Firstname','Lastname','Email','Role'],
colModel:[{name:'id', index:'id',width:35,resizable:false},{name:'pseudo', index:'pseudo'},{name:'firstname', index:'firstname'},{name:'lastname', index:'lastname'},{name:'email', index:'email'},{name:'role', index:'role'}],
pager: jQuery('#players_2_pager'),
rowNum:10,
rowList:[10,25,50,100],
imgpath: '/images/themes/lightness/images',
sortname: 'id',
viewrecords: true,
toolbar : [true,"top"],
sortorder: 'asc',
subGrid:false,
caption: "Football Players"
});
jQuery("#t_players_2").height(25).hide().filterGrid("players_2",{gridModel:true,gridToolbar:true});
jQuery("#players_2_select_button").click( function(){
var id = jQuery("#players_2").getGridParam('selrow');
if (id) {
handleSelection(id);
} else {
alert("Please select a row");
}
return false;
});
jQuery("#players_2").navGrid('#players_2_pager',{edit:false,add:false,del:false,search:false,refresh:true})
.navButtonAdd("#players_2_pager",{caption:"Search",title:"Toggle Search",buttonimg:'/images/jqgrid/search.png',
onClickButton:function(){
if(jQuery("#t_players_2").css("display")=="none") {
jQuery("#t_players_2").css("display","");
} else {
jQuery("#t_players_2").css("display","none");
}
}
});
});
</script>
Get ID of selected row
In this case, we added a "Get ID of selected row" link. When this
link is clicked, the Javascript method defined by :selection_handler is
called, with the ID of the row as a parameter :
<script type="text/javascript"> function handleSelection(id) { alert('ID selected : ' + id); } </script> <%=jqgrid (" Football Players ", " players_2 ", " /users ", [ { :field => " id ", :label => " ID ", :width => 35 , :resizable => false }, { :field => " pseudo ", :label => " Pseudo " }, { :field => " firstname ", :label => " Firstname " }, { :field => " lastname ", :label => " Lastname " }, { :field => " email ", :label => " Email " }, { :field => " role ", :label => " Role " } ], { :selection_handler => " handleSelection " } ) %> <a href="#" id="players_2_select_button">Get ID of selected row</a>
The ID of this link is very important, it must be the ID of the
jqgrid + "_select_button". You can use a button instead of a link if
you want.
Simple DataGrid with direct selection
<script type="text/javascript">
var lastsel;
jQuery(document).ready(function(){
jQuery("#players_3").jqGrid({
// adding ?nd='+new Date().getTime() prevent IE caching
url:'/users?nd='+new Date().getTime(),
editurl:'',
datatype: "json",
colNames:['ID','Pseudo','Firstname','Lastname','Email','Role'],
colModel:[{name:'id', index:'id',width:35,resizable:false},{name:'pseudo', index:'pseudo'},{name:'firstname', index:'firstname'},{name:'lastname', index:'lastname'},{name:'email', index:'email'},{name:'role', index:'role'}],
pager: jQuery('#players_3_pager'),
rowNum:10,
rowList:[10,25,50,100],
imgpath: '/images/themes/lightness/images',
sortname: 'id',
viewrecords: true,
toolbar : [true,"top"],
sortorder: 'asc',
onSelectRow: function(id){
if(id){
handleSelection(id);
}
},
subGrid:false,
caption: "Football Players"
});
jQuery("#t_players_3").height(25).hide().filterGrid("players_3",{gridModel:true,gridToolbar:true});
jQuery("#players_3").navGrid('#players_3_pager',{edit:false,add:false,del:false,search:false,refresh:true})
.navButtonAdd("#players_3_pager",{caption:"Search",title:"Toggle Search",buttonimg:'/images/jqgrid/search.png',
onClickButton:function(){
if(jQuery("#t_players_3").css("display")=="none") {
jQuery("#t_players_3").css("display","");
} else {
jQuery("#t_players_3").css("display","none");
}
}
});
});
</script>
If you want to call the handler directly when you select a row
instead of clicking on a link/button, use the following options. Of
course, you also need the Javascript method "handleSelection" defined
in the previous section.
<%=jqgrid (" Football Players ", " players_3 ", " /users ", [ { :field => " id ", :label => " ID ", :width => 35 , :resizable => false }, { :field => " pseudo ", :label => " Pseudo " }, { :field => " firstname ", :label => " Firstname " }, { :field => " lastname ", :label => " Lastname " }, { :field => " email ", :label => " Email " }, { :field => " role ", :label => " Role " } ], { :selection_handler => " handleSelection ", :direct_selection => true } ) %>
Simple DataGrid with multiple selections
<script type="text/javascript">
var lastsel;
jQuery(document).ready(function(){
jQuery("#players_4").jqGrid({
// adding ?nd='+new Date().getTime() prevent IE caching
url:'/users?nd='+new Date().getTime(),
editurl:'',
datatype: "json",
colNames:['ID','Pseudo','Firstname','Lastname','Email','Role'],
colModel:[{name:'id', index:'id',width:35,resizable:false},{name:'pseudo', index:'pseudo'},{name:'firstname', index:'firstname'},{name:'lastname', index:'lastname'},{name:'email', index:'email'},{name:'role', index:'role'}],
pager: jQuery('#players_4_pager'),
rowNum:10,
rowList:[10,25,50,100],
imgpath: '/images/themes/lightness/images',
sortname: 'id',
viewrecords: true,
toolbar : [true,"top"],
sortorder: 'asc',
multiselect: true,
subGrid:false,
caption: "Football Players"
});
jQuery("#t_players_4").height(25).hide().filterGrid("players_4",{gridModel:true,gridToolbar:true});
jQuery("#players_4_select_button").click( function() {
var s; s = jQuery("#players_4").getGridParam('selarrrow');
handleSelection(s);
return false;
});
jQuery("#players_4").navGrid('#players_4_pager',{edit:false,add:false,del:false,search:false,refresh:true})
.navButtonAdd("#players_4_pager",{caption:"Search",title:"Toggle Search",buttonimg:'/images/jqgrid/search.png',
onClickButton:function(){
if(jQuery("#t_players_4").css("display")=="none") {
jQuery("#t_players_4").css("display","");
} else {
jQuery("#t_players_4").css("display","none");
}
}
});
});
</script>
>%=jqgrid (" Football Players ", " players_4 ", " /users ", [ { :field => " id ", :label => " ID ", :width => 35 , :resizable => false }, { :field => " pseudo ", :label => " Pseudo " }, { :field => " firstname ", :label => " Firstname " }, { :field => " lastname ", :label => " Lastname " }, { :field => " email ", :label => " Email " }, { :field => " role ", :label => " Role " } ], { :selection_handler => " handleSelection ", :multi_selection => true } ) %> <a href="#" id="players_4_select_button">Get IDs of selected rows</a>
Simple DataGrid with master details
<script type="text/javascript">
var lastsel;
jQuery(document).ready(function(){
jQuery("#players_5").jqGrid({
// adding ?nd='+new Date().getTime() prevent IE caching
url:'/users?nd='+new Date().getTime(),
editurl:'',
datatype: "json",
colNames:['ID','Pseudo','Firstname','Lastname','Email','Role'],
colModel:[{name:'id', index:'id',width:35,resizable:false},{name:'pseudo', index:'pseudo'},{name:'firstname', index:'firstname'},{name:'lastname', index:'lastname'},{name:'email', index:'email'},{name:'role', index:'role'}],
pager: jQuery('#players_5_pager'),
rowNum:10,
rowList:[10,25,50,100],
imgpath: '/images/themes/lightness/images',
sortname: 'id',
viewrecords: true,
toolbar : [true,"top"],
sortorder: 'asc',
onSelectRow: function(ids) {
if(ids == null) {
ids=0;
if(jQuery("#players_5_details").getGridParam('records') >0 )
{
jQuery("#players_5_details").setGridParam({url:"/users/pets?q=1&id="+ids,page:1})
.setCaption("Pets: "+ids)
.trigger('reloadGrid');
}
}
else
{
jQuery("#players_5_details").setGridParam({url:"/users/pets?q=1&id="+ids,page:1})
.setCaption("Pets : "+ids)
.trigger('reloadGrid');
}
},
subGrid:false,
caption: "Football Players"
});
jQuery("#t_players_5").height(25).hide().filterGrid("players_5",{gridModel:true,gridToolbar:true});
jQuery("#players_5").navGrid('#players_5_pager',{edit:false,add:false,del:false,search:false,refresh:true})
.navButtonAdd("#players_5_pager",{caption:"Search",title:"Toggle Search",buttonimg:'/images/jqgrid/search.png',
onClickButton:function(){
if(jQuery("#t_players_5").css("display")=="none") {
jQuery("#t_players_5").css("display","");
} else {
jQuery("#t_players_5").css("display","none");
}
}
});
});
</script>
<script type="text/javascript">
var lastsel;
jQuery(document).ready(function(){
jQuery("#players_5_details").jqGrid({
// adding ?nd='+new Date().getTime() prevent IE caching
url:'/users/pets?nd='+new Date().getTime(),
editurl:'',
datatype: "json",
colNames:['ID','Name'],
colModel:[{name:'id', index:'id',width:35,resizable:false},{name:'name', index:'name',align:'center',width:500}],
pager: jQuery('#players_5_details_pager'),
rowNum:10,
rowList:[10,25,50,100],
imgpath: '/images/themes/lightness/images',
sortname: 'id',
viewrecords: true,
toolbar : [true,"top"],
sortorder: 'asc',
subGrid:false,
caption: "Pets"
});
jQuery("#t_players_5_details").height(25).hide().filterGrid("players_5_details",{gridModel:true,gridToolbar:true});
jQuery("#players_5_details").navGrid('#players_5_details_pager',{edit:false,add:false,del:false,search:false,refresh:true})
.navButtonAdd("#players_5_details_pager",{caption:"Search",title:"Toggle Search",buttonimg:'/images/jqgrid/search.png',
onClickButton:function(){
if(jQuery("#t_players_5_details").css("display")=="none") {
jQuery("#t_players_5_details").css("display","");
} else {
jQuery("#t_players_5_details").css("display","none");
}
}
});
});
</script>
We need associated data to create this master-details grid :
Add a relationship in your User (has_many :pets) and Pet (belongs_to :user) models.
Then add data to your migration file : you can use this one
.
Create the table :
And add the pets method in your users controller :
def pets if params [ :id ]. present? pets = User . find ( params [ :id ]). pets . find ( :all ) do paginate :page => params [ :page ], :per_page => params [ :rows ] order_by " #{params[:sidx]} #{params[:sord]} " end total_entries = pets . total_entries else pets = [] total_entries = 0 end respond_to do | format | format . json { render :json => pets . to_jqgrid_json ([ :id , :name ], params [ :page ], params [ :rows ], total_entries ) } end end
Don't forget to edit your routes and restart the server :
You can finally add your grids :
<%=jqgrid (" Football Players ", " players_5 ", " /users ", [ { :field => " id ", :label => " ID ", :width => 35 , :resizable => false }, { :field => " pseudo ", :label => " Pseudo " }, { :field => " firstname ", :label => " Firstname " }, { :field => " lastname ", :label => " Lastname " }, { :field => " email ", :label => " Email " }, { :field => " role ", :label => " Role " } ], { :master_details => true , :details_url => " /users/pets ", :details_caption => " Pets " } ) %> <br/> <%=jqgrid (" Pets ", " players_5_details ", " /users/pets ", [ { :field => " id ", :label => " ID ", :width => 35 , :resizable => false }, { :field => " name ", :label => " Name ", :width => 500 , :align => ' center ' } ] ) %>
The DOM ID of your details grid is important, it must be the ID of the master grid + "_details".
For evident reasons, data manipulation has been disabled in this demo
Data manipulation with inline editing
<script type="text/javascript">
var lastsel;
jQuery(document).ready(function(){
jQuery("#players_6").jqGrid({
// adding ?nd='+new Date().getTime() prevent IE caching
url:'/users?nd='+new Date().getTime(),
editurl:'/users/post_data',
datatype: "json",
colNames:['ID','Pseudo','Firstname','Lastname','Email','Role'],
colModel:[{name:'id', index:'id',width:35,resizable:false},{name:'pseudo', index:'pseudo',editable:true},{name:'firstname', index:'firstname',editable:true},{name:'lastname', index:'lastname',editable:true},{name:'email', index:'email',editable:true},{name:'role', index:'role',editable:true}],
pager: jQuery('#players_6_pager'),
rowNum:10,
rowList:[10,25,50,100],
imgpath: '/images/themes/lightness/images',
sortname: 'id',
viewrecords: true,
toolbar : [true,"top"],
sortorder: 'asc',
onSelectRow: function(id){
if(id && id!==lastsel){
jQuery('#players_6').restoreRow(lastsel);
jQuery('#players_6').editRow(id,true);
lastsel=id;
}
},
subGrid:false,
caption: "Football Players"
});
jQuery("#t_players_6").height(25).hide().filterGrid("players_6",{gridModel:true,gridToolbar:true});
jQuery("#players_6").navGrid('#players_6_pager',{edit:false,add:true,del:true,search:false,refresh:true})
.navButtonAdd("#players_6_pager",{caption:"Search",title:"Toggle Search",buttonimg:'/images/jqgrid/search.png',
onClickButton:function(){
if(jQuery("#t_players_6").css("display")=="none") {
jQuery("#t_players_6").css("display","");
} else {
jQuery("#t_players_6").css("display","none");
}
}
});
});
</script>
We need one last method in our controller to handle data manipulation.
Create the post_data method in your users controller :
def post_data if params [ :oper ] == " del " User . find ( params [ :id ]). destroy else user_params = { :pseudo => params [ :pseudo ], :firstname => params [ :firstname ], :lastname => params [ :lastname ], :email => params [ :email ], :role => params [ :role ] } if params [ :id ] == " _empty " User . create ( user_params ) else User . find ( params [ :id ]). update_attributes ( user_params ) end end render :nothing => true end
It's of course your role to add security & validation rules.
If protect_from_forgery is on, disable it for this action :
Edit your routes and restart the server :
You can now add the grid :
<%=jqgrid (" Football Players ", " players_6 ", " /users ", [ { :field => " id ", :label => " ID ", :width => 35 , :resizable => false }, { :field => " pseudo ", :label => " Pseudo ", :editable => true }, { :field => " firstname ", :label => " Firstname ", :editable => true }, { :field => " lastname ", :label => " Lastname ", :editable => true }, { :field => " email ", :label => " Email ", :editable => true }, { :field => " role ", :label => " Role ", :editable => true } ], { :add => true , :edit => true , :inline_edit => true , :delete => true , :edit_url => " /users/post_data " } ) %>
Data manipulation with modal editing (+ navigation)
<script type="text/javascript">
var lastsel;
jQuery(document).ready(function(){
jQuery("#players_7").jqGrid({
// adding ?nd='+new Date().getTime() prevent IE caching
url:'/users?nd='+new Date().getTime(),
editurl:'/users/post_data',
datatype: "json",
colNames:['ID','Pseudo','Firstname','Lastname','Email','Role'],
colModel:[{name:'id', index:'id',width:35,resizable:false},{name:'pseudo', index:'pseudo',editable:true},{name:'firstname', index:'firstname',editable:true},{name:'lastname', index:'lastname',editable:true},{name:'email', index:'email',editable:true},{name:'role', index:'role',editable:true}],
pager: jQuery('#players_7_pager'),
rowNum:10,
rowList:[10,25,50,100],
imgpath: '/images/themes/lightness/images',
sortname: 'id',
viewrecords: true,
toolbar : [true,"top"],
sortorder: 'asc',
subGrid:false,
caption: "Football Players"
});
jQuery("#t_players_7").height(25).hide().filterGrid("players_7",{gridModel:true,gridToolbar:true});
jQuery("#players_7").navGrid('#players_7_pager',{edit:true,add:true,del:true,search:false,refresh:true})
.navButtonAdd("#players_7_pager",{caption:"Search",title:"Toggle Search",buttonimg:'/images/jqgrid/search.png',
onClickButton:function(){
if(jQuery("#t_players_7").css("display")=="none") {
jQuery("#t_players_7").css("display","");
} else {
jQuery("#t_players_7").css("display","none");
}
}
});
});
</script>
<%=jqgrid (" Football Players ", " players_7 ", " /users ", [ { :field => " id ", :label => " ID ", :width => 35 , :resizable => false }, { :field => " pseudo ", :label => " Pseudo ", :editable => true }, { :field => " firstname ", :label => " Firstname ", :editable => true }, { :field => " lastname ", :label => " Lastname ", :editable => true }, { :field => " email ", :label => " Email ", :editable => true }, { :field => " role ", :label => " Role ", :editable => true } ], { :add => true , :edit => true , :inline_edit => false , :delete => true , :edit_url => " /users/post_data " } ) %>
Data manipulation with various input types
<script type="text/javascript">
var lastsel;
jQuery(document).ready(function(){
jQuery("#players_8&quo
发表评论
-
actionmailer发送邮件失败的问题解决记录
2011-05-24 14:12 2334我们公司的WLAN网管采用ruby on rails架构,同时 ... -
ROR rake
2009-10-20 14:05 1046原文: Ruby on Rails Rake Tuto ... -
控制器内部对请求的操作
2009-10-20 13:41 1843控制器内部对请求的操作 一Action方法 1 ... -
在rails环境中直接执行sql语句而不需要创建MODEL
2009-09-23 10:54 2987标准格式是:ActiveRecord::Base.connec ... -
6 Steps To Refactoring Rails (for Mere Mortals)
2009-07-31 11:26 866Since December, Rails ... -
rails 中简单的创建保存一条信息
2009-07-20 09:43 716Securitylog.new( # :ses ... -
uninstall all gems
2009-07-14 11:31 875GEMS=`gem list --no-versions` ... -
rails 拖拉排序效果demo
2009-06-30 10:55 1351要為Ruby on Rails程式加入拖曳排 ... -
something about with_scope
2009-06-23 10:53 1157今天看了一点关于with_scope的知识,有点感觉,写点东西 ... -
Multiple Attachments in Rails
2009-06-03 10:19 1820Multiple Attachments in Rails ... -
REST on Rails之自定义路由
2009-06-03 10:03 1685REST on Rails之自定义路由 from L ... -
自定义will_paginage输出
2009-06-03 09:55 786自定义will_paginage输出 from Le ... -
Rails Cookie测试
2009-06-03 09:48 1077Rails Cookie测试 from Le ... -
配置ActionMailer使用GMail发送邮件
2009-06-03 09:45 1450配置ActionMailer使用GMail发送邮件 ... -
rails 记住跳转前的url
2009-06-02 13:44 1381def store_location ses ... -
给Non-ActiveRecord Objects进行validate
2009-06-02 09:33 886对于非ActiveRecord对象的Validation,我们 ... -
file_column简单的照片上传
2009-04-21 18:19 9661.file_column git clone git:/ ... -
cookie + js动态修改iframe 父窗口的链接参数
2009-04-21 18:12 2870取得 由于最近自己做的项目中采用了目前较为流行的经典左右结构 ... -
git 冲突解决
2009-04-21 17:57 5169比较笨的办法就是直接改本地的代码 先git pull ,他 ... -
git 下gw来查看团队的修改
2009-04-07 15:46 856首先开启一个命令行,在命令行中输入 alias gw= ...
相关推荐
ASP.NET Core Recipes is a practical guide for developers creating modern web applications, cutting through the complexities of ASP.NET, jQuery, React, and HTML5 to provide straightforward solutions to...
•migrating a project from ASP.NET web forms to the MVC 4 including recipes for converting DataGrids, Forms, Web Parts, Master Pages and navigation controls •Client side data binding and templating ...
Studio for WPF features all of the rich data visualization and LOB controls you need to shorten your development time and create compelling Windows desktop applications. Choose from 50+ WPF controls ...
Studio for WPF features all of the rich data visualization and LOB controls you need to shorten your development time and create compelling Windows desktop applications. Choose from 50+ WPF controls ...
Studio for WPF features all of the rich data visualization and LOB controls you need to shorten your development time and create compelling Windows desktop applications. Choose from 50+ WPF controls ...
- **LINQ to SQL**:LINQ to SQL是LINQ的一个具体实现,专门用于处理关系数据库。它为.NET Framework提供了将数据库表映射到.NET类的能力,并提供了一种简单的方法来执行CRUD操作(创建、读取、更新和删除)。 - **...
The article evolves from simple concepts about XML to creation of XML documents, to DataSource assignment from XML documents to ListBoxes and DataGrids, and finally to DataSource update from changes ...
这些类使得我们可以使用Linq-to-Entities进行查询,简化了数据库交互。 接下来,我们需要在XAML中设计UI,包括添加DataGrid控件。DataGrid是WPF中用于展示表格数据的强大控件。我们可以通过绑定DataGrid的...
标题 "在DataGrids,下拉列表中轻松使用ADO" 暗示了本文将讨论如何在.NET框架中,特别是ASP.NET环境下,有效地利用ADO(ActiveX Data Objects)技术来与数据库交互,并在DataGrid控件和下拉列表中显示数据。...
数据网格用于处理 IMDG 的模式、实用程序和库如何构建你需要: 安装了gradle。 在撰写本文时为 v2.1。 连贯性.jar。 在撰写本文时为 v12.1.3。 一个名为 JAVA_3RD_PARTY_LIBS 的环境变量,这样 coherence.jar 可以在...
在Windows Forms(WinForms)应用开发中,我们经常会遇到数据展示和操作的需求,例如将`TreeNodes`(树形结构的节点)与`DataGrids`(数据网格)结合使用。`TreeNode`是`TreeView`控件的基本元素,用于表示层次化的...
一方面,DataGrids大大简化了在HTML中通过表格中描述数据源,另一方面,DataGrid在服务器端如此重要,导致了大量的页面请求被传回服务器。例如,当用户使用分页DataGrid时,从一个页面转到另一个页面就会导致页面...
datagrids.yml 实体.yml images.yml layout.yml navigation.yml requirejs.yml search.yml system_configuration.yml theme.yml 工作流程 在应用程序执行期间动态添加的实体方法的自动完成。 可以通过 ...
JAWIG 代表 Javascript Advanced Widget Generator,是一个 Javascript 框架,用于仅使用 HTML 标签生成高级小部件,如 Datagrids、Tabletabs、Windows、Datatrees、Menus 和 Contextmenus。
DataGrids、列表和树是Flex应用中常用的控件,用于展示大量数据。本章通过多个实例演示了如何使用这些控件,并提供了有关性能优化方面的建议。 - **第9章:列表定制** 除了标准的列表控件外,Flex还支持高度定制...
在项目中提到的“第三方控件”,可能包括一些预构建的UI组件,如DataGrids、Charts、Calendars等,这些控件可以简化开发过程,提供更好的用户体验。它们可能来自于DevExpress、Telerik或DevExpress等供应商,用于...
1. 数据网格(DataGrids):这些控件提供了用于显示和编辑数据库表的行和列的可视化界面。它们通常具有丰富的自定义选项,如列宽调整、排序、过滤、分页等功能,允许用户根据需求定制界面。 2. 数据绑定组件(Data-...
此外,数据可视化工具如Charts和DataGrids可以帮助用户直观理解数据。 5. 安全与权限管理:对于多用户环境,系统需支持用户登录和权限控制。C#的身份验证和授权机制可以实现这一功能,确保只有授权的用户能访问特定...
5. **DataGrids**:无论是WinForms还是ASP.NET,数据网格都是关键组件,用于展示和操作大量数据。DevExpress的数据网格控件提供了丰富的特性和性能优化。 在压缩包中,我们看到了几个重要的文件: - **gac.bat**:...