I’ve
created a sample project to demonstrate the problem I’m trying to solve. I have
a grid that has no fixed width. All columns except one has initial fixed width
and the one that has automatic width can clip text if the width is too small
for the cell content. When I resize the browser the “auto width” column changes its
width. When grid becomes to narrow the horizontal scroll bar is shown (that is
desired behavior since I set a min width for the grid so that auto width column
doesn’t disappear if the grid becomes too narrow). At the same time, I need to show
more rows than that can fit in the grid's height and I don’t want to have vertical
scroll bar.
Everything
I mentioned works great as you can see in the example. The problem begins when
the grid height is changed.
Here are
the repro steps:
Sizing problem is even worse when a grid is in a tab control. That one is harder to reproduce because it doesn’t break the grid always on the first try but repro steps would be:
@{
Html.EJ().Tab("tabs")
. . . .
.ClientSideEvents(eve => { eve.ItemActive("active");})
. . . .
}
<script type="text/javascript">
function active(args)
{
var id = $(args.activeHeader).find("a").attr("rel='nofollow' href")
var gridId = $(id).find(".e-grid.e-waitingpopup").attr("id");
setTimeout(function () { $("#" + gridId).ejGrid('windowonresize'), 0 });
}
</script>
|