EasyUI Forum

General Category => EasyUI for jQuery => Topic started by: Darrel on March 02, 2017, 03:29:35 AM



Title: Datagrid extra blank column [Solved]
Post by: Darrel on March 02, 2017, 03:29:35 AM
Hello,

I'm stuck in a silly issue with the datagrid. I can see that the last column of the datagrid is not to the full width of the div in which it is contained. See the extreme right hand side of the grid. The following reloado code will display the same:  http://code.reloado.com/unupaq3/2/edit (http://code.reloado.com/unupaq3/2/edit)

However I noticed one thing that if I play around with the width of the div, the size of that extra column changes accordingly. For example when the div has a width of 100% the grid loads properly without that extra space in the last... reloado code for this case: http://code.reloado.com/unupaq3/3/edit#source (http://code.reloado.com/unupaq3/3/edit#source)

Referring to some other older posts as well I tried the following:
1) Setting fixed: true in the column object and excluding the property in the last column. But it didn't work!!!!! http://code.reloado.com/unupaq3/4/edit (http://code.reloado.com/unupaq3/4/edit)

2) Tried using fitColumns as well. This didn't work as well!!!!!
Code:
$("#DATAGRID_TEST").datagrid('fitColumns');

reloado link for the above code block: http://code.reloado.com/unupaq3/5/edit (http://code.reloado.com/unupaq3/5/edit)


I can modify the colData to set properly as per this example: http://code.reloado.com/unupaq3/6/edit (http://code.reloado.com/unupaq3/6/edit)

But if i resize the screen then, booooom it appears again!!!!!!!! :o :'(
Also it is not recommended to get calculate the size everytime during resize in the code itself!!!! That's the reason why the width is given in percentage!!!

Please could you tell me how to avoid that extra visible section this the size of the div in which the datagrid is contained is around 33% only.

Regards,
Darrel


Title: Re: Datagrid extra blank column
Post by: jarry on March 02, 2017, 07:56:11 AM
Please look at this example http://code.reloado.com/unupaq3/7/edit


Title: Re: Datagrid extra blank column
Post by: Darrel on March 03, 2017, 01:12:52 AM
Hello jarry,

Thanks a lot for your help. It solved the issue :)

Regards,
Darrel