EasyUI
Home
Demo
Tutorial
Documentation
Download
Extension
Contact
Forum
EasyUI Forum
May 16, 2024, 10:41:34 AM
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
>
Resize datagrid column width programmatically
Pages: [
1
]
« previous
next »
Print
Author
Topic: Resize datagrid column width programmatically (Read 6678 times)
oyvind
Newbie
Posts: 4
Resize datagrid column width programmatically
«
on:
May 15, 2017, 04:57:41 AM »
Hello again, thanks for previous help!
I was wondering if it is possible to change the size of a column in a datagrid programmatically.
Something like:
$('#dg').datagrid('resizeColumnWidth', {field: 'col1', width: 100});
I tried using the cellClass from column options with the jQuery width() method [ $('.' + cellClass).width(100);], and do the same thing in the resize event of the datagrid. That works, but to me it seems like I'm adding unnecessary code.
Sorry if there is an obvious answer; I have been searching the documentation.
Thank you!
Logged
stworthy
Administrator
Hero Member
Posts: 3581
Re: Resize datagrid column width programmatically
«
Reply #1 on:
May 15, 2017, 07:30:07 AM »
Please look at this topic
https://www.jeasyui.com/forum/index.php?topic=3321.0
Logged
oyvind
Newbie
Posts: 4
Re: Resize datagrid column width programmatically
«
Reply #2 on:
May 15, 2017, 07:56:23 AM »
That works, thank you! I should learn to search more haha.
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...