EasyUI
Home
Demo
Tutorial
Documentation
Download
Extension
Contact
Forum
EasyUI Forum
October 10, 2024, 10:37:17 PM
Welcome,
Guest
. Please
login
or
register
.
1 Hour
1 Day
1 Week
1 Month
Forever
Login with username, password and session length
News
:
Home
Help
Search
Login
Register
EasyUI Forum
>
General Category
>
EasyUI for jQuery
>
datagrid column title
Pages: [
1
]
« previous
next »
Print
Author
Topic: datagrid column title (Read 23113 times)
Xiaolin
Newbie
Posts: 14
datagrid column title
«
on:
July 24, 2011, 08:59:21 AM »
How can we get the datagrid column title? For example:
<table class="easyui-datagrid">
<thead>
<tr>
<th field="Name" width="60">Name</th>
<th field="Sex" width="35">Sex</th>
</tr>
</thead>
</table>
How can we get the "Name" and "Sex" text? Thanks in advance.
Logged
stworthy
Administrator
Hero Member
Posts: 3581
Re: datagrid column title
«
Reply #1 on:
July 24, 2011, 06:09:35 PM »
var fieldName = 'Name'; // the field name
var opts = $('#tt').datagrid('getColumnOption',fieldName); // get the specified column option
alert(opts.title); // the title to display
Logged
Xiaolin
Newbie
Posts: 14
Re: datagrid column title
«
Reply #2 on:
July 25, 2011, 06:48:53 AM »
Got it, thank you very much!
Logged
Pages: [
1
]
Print
« previous
next »
Jump to:
Please select a destination:
-----------------------------
General Category
-----------------------------
=> News
=> General Discussion
=> EasyUI for jQuery
=> EasyUI for Angular
=> EasyUI for Vue
=> EasyUI for React
=> Bug Report
Loading...