jqueryhtml-tablewijmo

wijgrid not rendering properly sometimes when inside a div having display:none


I have a wijgrid and it does not render properly inside a div having style display:none

<div style="display:none">
  <div>
     <table id="table1"><table>
  </div>
<div>

I then build the thead and tbody dynamically and the setup wijgrid.

$("#table1").wijgrid(); 

The code works fine sometimes but sometimes the table gets rendered with width="0px" I have attached the output.The output


Solution

  • Not sure if you are still looking at this but you will need to draw the wijgrid in the javascript you use to display the div.

    My experience has been when dealing with anything hidden in wijmo is that even when you unhide the div not everything will be drawn correctly anyway.

    I have tried hiding and unhiding widgets that use a variety wijmo components and almost everything needs redrawn after the unhide or sorting.