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. mysql_fetch_row,mysql_fetch_array,mysql_fetch_assoc的区别

    <?php $link=mysql_connect('localhost','root',”); mysql_select_db('abc',$link); $sql = “select * f ...

  2. what are Datatypes in SQLite supporting android

    As said at Datatypes In SQLite Version 3: Datatypes In SQLite Version 3 Most SQL database engines (e ...

  3. iOS 23 种设计模式

    设计模式主要分三个类型:创建型.结构型和行为型. 其中创建型有: 一.Singleton,单例模式:保证一个类只有一个实例,并提供一个访问它的全局访问点 二.Abstract Factory,抽象工厂 ...

  4. smarty中的母板极制_extends和block标签

    模板继承 继承是从面向对象编程而来的概念,模板继承可以让你定义一个或多个父模板,提供给子模板来进行扩展. 扩展继承意味着子模板可以覆盖部分或全部父模板的块区域. 继承结构可以是多层次的,所以你可以继承 ...

  5. 【BZOJ】【1834】【ZJOI2010】Network 网络扩容

    网络流/费用流 这题……我一开始sb了. 第一问简单的最大流…… 第二问是要建费用流的图的……但是是在第一问的最大流跑完以后的残量网络上建,而不是重建…… 我们令残量网络上原有的弧的费用全部为0(因为 ...

  6. Matlab中cell2mat的使用

    binIndices是1*50的cell,每个cell是的1*n(n不定),那么cell2mat(binIndices)得到的是1*sum(cellfun(@length,binIndices))的行 ...

  7. input点击删除默认value,以及只能输入数字,删除,tab

    /*inputhastip类绑定事件*/ $('.inputhastip').css("color", "#999"); $('.inputhastip').b ...

  8. 2-Highcharts曲线图之折线图

    示例图片,在网上下载一张图片如图:其中数据自定义 引入上节模版配置  在script标签中写代码:具体代码如下   信息将在代码中解释. 分析:“五省收益趋势”是标题: x坐标为[2011年-2016 ...

  9. intellij idea 14 ULTIMATE 注册码

    Name:happy KEY:63763-YCO0I-QR4TV-G4I3E-4XGK9-GQSQ3

  10. uva 10303

    卡特兰数  但是个高精度 一开始用最普通的递推式 超时了 百度百科了一下 用另类递推式过了 ~~ 这个大数类是做数据结构课程设计的时候写的... #include <cstdio> #in ...