Hi,
I've just installed new 2012.2 version, but I still have the same problem I had with last version.
I am using different grid objects and, only with this one, I have this strange behavior:
Do you know which can be the problem? In other grids I left out column width during their definition and it works correctly.
Thanks
Flavio
I partially solved in this way, but please correct me if I am wrong.Let's start from the above bad visualization. If I select a hiddable column and I hide it, all the grid layout is re-rendered to a perfect visualization.This is great...so what I tried to do? I just put this kind of code in the javascript section:
$(".tab").tabs({ select: function (event, ui) { if ((ui.index == 1)) { $("#grid_id").igGridHiding("hideColumn", "XXXColumn"); } } });
What I do is the following: when I click on a tab, I force the grid to hide a column that I wanted to hide, but I set on show by default. The result is that when the script code hide theXXXColumn, grid layout is rendered again, occuping the 100% width. And in this way it is done automatically...
Hello Flavio,
Thank you for the detailed explanations and I appologize for the late answer.
I was able to reproduce the issue when the igGrid is in the second tab and its width is 100%.
It seems that the width is taken in pixels then and that causes the issue.
You may fix this by NOT setting the width property. The default styling of .ui-iggrid-table (from infragistics.ui.grid.css) automatically sets width:100%
Your solution is OK too. I tried it and it seems to solve the issue.
Try by removing the width property and let me know the results.
Hi Tsvetelina,
I found out another thing in which I need your help. Let's stay on this subject...I have the same behavior (columns all against the other ones, like the picture) if I defined them in the following way: gm.Columns.Add(new GridColumn("Id", "Id", "number", "0%")); gm.Columns.Add(new GridColumn("ID FTable", "IDFTable", "number", "0%")); gm.Columns.Add(new GridColumn("Description", "Description", "string", "50%")); gm.Columns.Add(new GridColumn("Notes", "Notes", "string", "50%"));
I can't hide the second column (IDFTable), because if I set its property to hide or with igGridHiding feature I will not have it on the ig_transaction log when I will edit the object. But why am I not able to define a 0% percentage on the column?Thanks
FlavioPS The behavior is the same with or without Width=100%...
Thank you for the update.
It appears that the grid recalculates the width in pixels when it is inside other container.
I can suggest you 2 approaches
1) Define the grid's container globally on the page
#grid1_container
{
width:100% !important;
}
<div id="tabs-2" >
<table id="grid1" >
</table>
</div>
2) Initialize the grid inside the "create" event handler of the tab
$.ig.loader(function () {
$("#tabs").tabs({
create: function(event, ui) {
$("#grid1").igGrid({
....
width:"100%",
….
});
Hope this helps.
I sang victory too quickly...What you suggested me it's perfect for IE9, but for IE8 I still have one little problem: grid is rendered good; I try to hide a column and that column is correctly hidden, laying the grid not at 100% but at 100% - hidden column size...it seems that the grid does not render to 100% width.I tried with 100% !important, but this is good just for the first page loading, not during grid usage (like hiding columns...).Ideas?
This issue is going to become very boring...Thanks in advance,
PS If it can help, resizing feature works fine: if I resize a column, 100%width is correctly recalculated and showed...