I have the following settings on my igGrid:
When I resize my browser window, the columns holding the data resize automatically to fit the width of the page, however the header columns don't. I end up with this:
Is this a bug that has been fixed in the upcoming service release or am I doing something wrong with my settings?
Hi,
Having width 100% for the grid and a fixed pixel defaultColumnWidth for the columns is not applicable/supported together. If you have width 100 % defined, basically you shouldn't have any fixed column width set, as it will not have any effect and will lead to side effects as the one described. Default column width basically means a fixed, same width, applied on all columns - which doesn't change whether you resize the browser or not. You can define percentage width individually for any column, and it will play nicely with 100 % on the grid, while you're resizing the browser. So you can have 10%, 20%, etc. defined individually for any column (just as an example).
Let me know if this helps. Thanks,
Angel
Hi again,
just to clarify, above i was referring to the case when no column has a specific width applied, and you are only setting "defaultColumnWidth" in px. If you have some columns with percentage width defined, and some columns don't have any width set, and at the same time you have defaultColumnWidth in px, and percentage width for the grid, this combination will work fine. It will just make the columns that don't have width be 100 px, and then only the other percentage columns will resize when the grid resizes. I suppose that's what you are probably trying to achieve?
Thank you, Angel
Unfortunately not. If I don't provide a default column width, it resizes the columns so that they all fit within the width of the grid (i.e. 40 super skinny columns).
What I really need is to be able to say that the minimum column width is 100px, and if the width of the grid is greater than the number of columns x 100px, then increase the column width of each column to evenly fill the grid width.
Hello,This is not a supported scenario from our control. If you want to see this feature in future versions of our controls I will log a feature request for you.
That would be great Nikifor, I think it would be a handy feature to have for everyone who has variable column grids.
Hello,I have sent your feature request directly to our product management team. Our product team chooses new feature requests for development based on popular feedback from our customer base. Infragistics continues to monitor application development for all of our products, so as trends appear in requested features, we can plan accordingly.
We value your input, and our philosophy is to enhance our toolset based on customer feedback. If your feature is chosen for development, you will be notified at that time. Your reference number for this feature request is FR13572.
If you would like to follow up on your feature request at a later point, you may contact Developer Support management via email. Please include the reference number of your feature request in the subject and body of your email message. You can reach Developer Support management through the following email address: dsmanager@infragistics.com
Thank you for your request.
Hello
Has any work been done on the feature request? Has it been implemented?
We have a very similar issue like the one described in this thread. We are creating an igGrid with a variable number of columns. We want to have the headers fill the horizontal space when 'number of columns' * 'fixed width' is less than the grid width or give them a fixed width when it is over the grid width.
When instantiating the grid we're using the following settings:
responseDataKey: 'd.results', width: '100%', defaultColumnWidth: "200px", height: '450px', dataSource: self._options.requestGUID, fixedHeaders: true, autoGenerateColumns: false, autofitLastColumn: true,
and the following features: Paging, Filtering, Sorting, Tooltips, RowSelectors, Selection.
Column options are recieved from an AJAX call before instantiating the grid:
$.when(headerDeferred, igDeferred).done(function (tableSchema) {
if (tableSchema != undefined && tableSchema.length && tableSchema.length > 0) {
var headerInfo = [];
tableSchema.forEach(function (e, i) {
headerInfo.push({
headerText: e.title,
key: e.id,
});
options.columns = headerInfo;
}
$(self.options.checkboxGridSelector, self.element).igGrid(options);
Edit: I forgot to add the version we are using, it's 13.2.20132.2055
Regards, Mario