EasyUI Forum

General Category => EasyUI for jQuery => Topic started by: argumentum on February 05, 2018, 09:22:22 PM



Title: [Solved] datagrid detailview, pagination, rownumber Width, autosize
Post by: argumentum on February 05, 2018, 09:22:22 PM
I have a mix of everything one can have in a datagrid and trying to find why the rownumberWidth don't work, I found that on the example on http://www.jeasyui.com/tutorial/datagrid/datagrid21.php (http://www.jeasyui.com/tutorial/datagrid/datagrid21.php) ,when one is to add rownumbers="true" rownumberWidth=100 ,it does not work.

I've tried every solution given in the forum without success.

What I'm looking for is to autosize the column, as it usually is two digits, but I have 61000 records and if one goes to the last record, it looks just plain ugly and the pagination should be autosized as I use buttons and is unreadable.

(https://i.imgur.com/Pegbm7a.png)

Thanks


Title: Re: datagrid detailview, pagination, rownumber Width, autosize
Post by: stworthy on February 05, 2018, 11:42:55 PM
Set a bigger 'rownumberWidth' value to make the row number column wider. Add this code to set the style of the page numbers.
Code:
<style type="text/css">
  .pagination-link .l-btn-text{
    width: auto;
    min-width: 24px;
    padding: 0 4px;
    box-sizing: border-box;
  }
</style>


Title: Re: datagrid detailview, pagination, rownumber Width, autosize
Post by: argumentum on February 06, 2018, 11:17:38 AM
Add this code to set the style of the page numbers.
Code:
<style type="text/css">
  .pagination-link .l-btn-text{
    width: auto;
    min-width: 24px;
    padding: 0 4px;
    box-sizing: border-box;
  }
</style>
Worked great !
(https://i.imgur.com/q4RfYL9.png)

Is there a way to fix the column ?
when one is to add rownumbers="true" rownumberWidth=100 ,it does not work. =(

You presented a solution at https://www.jeasyui.com/forum/index.php?topic=3705.0 (https://www.jeasyui.com/forum/index.php?topic=3705.0) but it uses view:, so I can not use it.

There is another one at http://www.jeasyui.com/forum/index.php?topic=5973.0 (http://www.jeasyui.com/forum/index.php?topic=5973.0) but it has a function setBodySize(target); and is not found.

Thanks


Title: Re: datagrid detailview, pagination, rownumber Width, autosize
Post by: argumentum on February 06, 2018, 04:16:41 PM
You presented a solution at https://www.jeasyui.com/forum/index.php?topic=3705.0 but it uses view:, so I can not use it.

Well, I added the code to datagrid-detailview.js and it works in an example, but not in my project. I'll have to t/s my code, the issue has been resolved ... thanks.

(https://i.imgur.com/ppHvI1S.png)
(https://i.imgur.com/b78Udnw.png)