Extracted from: http://stackoverflow.com/questions/16061894/jquery-easyui-add-link-to-cell

HTML:

 <table id="dgContactSearch" title="Benutzer Suche" class="easyui-datagrid" style="height:160px"
url="getContacts.php"
toolbar="#toolbarContactSearch" pagination="true"
rownumbers="true" fitColumns="true" singleSelect="true">
<thead>
<tr>
<th data-options="field:'firma',width:80,align:'left',formatter:formatCustomerId">Kunde</th>
<th data-options="field:'name',width:50,align:'left',formatter:formatContactUrl">Name</th>
<th field="function" width="50">Funktion</th>
<th field="phone" width="50">Phone</th>
<th field="email" width="50">Email</th>
<th field="mobile" width="50">Mobile</th>
<th field="fax" width="50">Fax</th> <th field="comment" width="120">Kommentare</th>
</tr>
</thead>
</table>
 

Javascript:

 <script>
function formatCustomerId(val,row){
var url = "customerView.php?id=";
return '<a href="'+url + row.customer_id+'">'+val+'</a>';
} function formatContactUrl(val,row){
var url = "contactView.php?id=";
return '<a href="'+url + row.id+'">'+val+'</a>';
}
</script>
 

REF:

http://blog.csdn.net/com360/article/details/6537074
http://www.jeasyui.com/documentation/datagrid.php
http://jeasyui.com/demo/main/index.php?plugin=DataGrid
http://www.thinkphp.cn/code/207.html

jQuery EasyUI - Add link to datagrid cell的更多相关文章

  1. 在jQuery EasyUI中实现对DataGrid进行编辑

    <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/ ...

  2. jQuery EasyUI - 数据表格(DataGrid)

    由于工作需要,项目使用前端 jQuery EasyUI - DataGrid 来控制数据表格. 1.加载相关js和css,因为easyui依赖jquery,所有加载easyui前要先加载jquery, ...

  3. jquery easyui 1.3.4 datagrid pageNumber 設置導致兩次請求的解决方案

    $('#table').datagrid({ url: '/get/data/path/to/your/server', pageNumber: , pageSize: , ... }); 當手動設置 ...

  4. jquery easyui window中的datagrid,只能显示一次问题

    最近项目中用到easyui 的动态创建window ,window中嵌入了datagruid.第一次打开是能显示数据,但再次打开时确没显示: 注:url已成功返回了数据. 多次查阅easyui帮助文档 ...

  5. jQuery EasyUI教程之datagrid应用

    一.利用jQuery EasyUI的DataGrid创建CRUD应用 对网页应用程序来说,正确采集和管理数据通常很有必要,DataGrid的CRUD功能允许我们创建页面来列表显示和编辑数据库记录.本教 ...

  6. jQuery EasyUI教程之datagrid应用-1

    一.利用jQuery EasyUI的DataGrid创建CRUD应用 对网页应用程序来说,正确采集和管理数据通常很有必要,DataGrid的CRUD功能允许我们创建页面来列表显示和编辑数据库记录.本教 ...

  7. jquery easyui datagrid 远程加载数据----javascript法

    jquery easyui有三种办法生成datagrid(数据网格),本篇专门讨论javascript借助jquey easy ui实现的方式 html部分 <main role="m ...

  8. jquery easyui中文培训文档

    目  录 1.... Accordion(可折叠标签)... 2 1.1          实例... 2 1.2          参数... 3 2.... DateBox(日期框)... 4 2 ...

  9. jquery+easyui开发、培训文档

    目  录 1.... Accordion(可折叠标签)......................................................................... ...

随机推荐

  1. MVC学习系列——Model验证扩展

    MVC中,实现了前端后端的验证. 前端验证.步骤: web.config这两个得开启: <add key="ClientValidationEnabled" value=&q ...

  2. Jquery post 传递数组给asp.net mvc方法

    以批量删除数据为例  做批量删除会需要传递要删除的数据ID数组 function RemoveLog(){ var postModel=[]; //遍历复选框获取要删除的数据ID 存放到数组中  $( ...

  3. RCP,TCP,C/S,B/S

    RCP: RICH CLIENT PROGRAM   胖客户端 TCP: THIN CLIENT PROGRAM   瘦客户端 CS: CLIENT SERVER             客户端/服务 ...

  4. ORA-06550:line 1,column 7;PLS-00201:indentifer '存储过程' must be declared;...PL/SQL Statement ignored 问题

    前段时间由于修改SMES系统,出现了一个问题. ORA-06550:line 1,column 7;PLS-00201:indentifer '存储过程' must be declared;...PL ...

  5. Azure VM 远程无法登陆问题(No Remote Desktop License)

    解决方法: 打开 Wins+R=> mstsc /v: yourVMIPadress /admin mstsc /v:xx.xx.xx.xx:54738 /admin

  6. Ext学习-布局介绍

    1.目标    了解ExtJS中的关于布局和组建的相关原理,并学习相关的布局方式 2.内容   1.布局和组件的相关原理   2.常见的布局方式 3.学习流程    1.首先应该学习一下布局和组件的相 ...

  7. 解决eclipse打开报错:failed to create the java virtual ma

    在Eclipse安装目录下找到:eclipse.ini 将如下参数改为: --launcher.XXMaxPermSize 128M ------------------------------- 说 ...

  8. JS常见排序算法

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/ ...

  9. spring测试父类,使用junit-4.4.jar,spring-test.jar

    @ContextConfiguration(locations = "classpath:conf/applicationContext.xml") @RunWith(Spring ...

  10. ASP .NET 如何在 SQL 查询层面实现分页

    [编者按]本文作者为来自巴基斯坦的软件开发工程师 Aqeeel,主要介绍了在 SQL 查询层面实现 ASP.NET 应用的分页方法. 本文系 OneAPM 工程师编译呈现,以下为正文. GridVie ...