I am using asp.net MVC and IgGrid in my Web Application.
I have a screen, in which there are 2 dropdowns:
@Html.DropDownListFor(m => m.SelectedYear, Model.lstYear, "- Select Year -", htmlAttributes: new { @class = "form-control", @id = "cmbYear", @onChange = "doCascade(this, '" + Url.Action("GetType", "Project", new { area = "Main" }) + "', 'cmbType')" })@Html.DropDownListFor(m => m.SelectedType, Model.lstType, "- Select Type -", htmlAttributes: new { @class = "form-control", @id = "cmbType"})
and a Load button:Load
When I select the fields from dropdown list and click on Load button, to populate the data inside igGrid, While under loading process, the columns are cramped (this is for some seconds, until the loading process)
Please let me know how to resolve it. Attached is the snapshot of the issue-
Thanks in advance
Hi Pree,
Can you send me a running sample that demonstrates the issue?
Regards,
Tsanna
Hi Tsanna,Thank you for the reply. Please kindly review my posted question again, I had uploaded the image of the issue that i am facing. If possible please try to rectify the issue without sample code and let me know some way to resolve it.Thanks in advance.
Hello Pree,
As far as I can see, you have a lot of columns in your grid. Which features are enabled in the grid and what type of data source it's bound to: remote or local? Did you try to turn on column virtualization? Please give me more details around your configuration.
Dear Tsanna,Thank you for the reply.Attached within is the UCHierarchicalGridUI.cs Controller file, in which you may see all the features I am using in my igGrid.
Also, the data source is bound to local or remote doesn't matter as the issue happens always While grid is under loading process.
This issue persists when I put a break point on click of Load button until it executes the entire BindGrid() method (to bind the data in igGrid)OR you may say While grid is under loading process(described before). I am not sure whether the problem is due to lot of columns in grid or any other reason.Please note that I am using asp.net MVC. Please help how to resolve it. Thanks in advance.
I noticed that you have several features including ColumnFixing. However please note that currently ColumnFixing is not supported with Unbound columns. Did you try my previous suggestion to use column virtualization in case that you have a lot of columns?
Regards,Tsanna
Hi Tsanna,Thank you for the reply. I am new in infragistics igGrid so I am unable to add the code for column virtualization in my existing features file(that I has attached in above reply). I read post on the same and tried implementing the code in my existing features file but couldn't succeed. Could you please help me to implement the code for column virtualization in my existing attached code ?Waiting for the reply.Thanks in advance.
Hello Pree Khanna,
I am assisting with this issue since Tsanna is not available due to a holiday.
You can enable column virtualization by setting the GridModel's ColumnVirtualization property to true. You can also find additional information on using column virtualization in our documentation here.
If you need further assistance with this, please let me know and I will be glad to help.
Hi Michael,
Thank you for the reply.
There is a "GridModel" class in which below properties are pre-defined:
public bool? ColumnVirtualization { get; set; }public bool? Virtualization { get; set; }public VirtualizationMode? VirtualizationMode { get; set; }public string AvgColumnWidth { get; set; }public string AvgRowHeight { get; set; }//etcpublic bool? AutoGenerateColumns { get; set; }
In "UCHierarchicalGridUI.cs" class, I am trying to set the ColumnVirtualization as below:
private void SetGridModel(GridModel oGridModel, GridDO oGridDO){ oGridModel.AutoGenerateColumns = false;
oGridModel.ColumnVirtualization = true; //added}
Now, when I run the application, I get below error:
Multi-column headers feature is not supported with columnVirtualization
Please let me know what is wrong and how to resolve it.
NOTE: to know what are the features of igGrid I am using in my application, please refer to the attached igGrid Properties.txt file.