Having issues with Infragistics column resizing - winforms

I have a grid and I would like to automatically resize the columns. I'm running into inconsistencies when using different parameter values for PerformAutoResize(). When passing in the values below, where the true means include column headers:
PerformAutoResize(PerformAutoSizeType.VisibleRows, true);
some columns will be resized based solely on the header, while others will resize properly based on both the header and the row values.
However, if I hardcode in a value:
PerformAutoResize(20);
It works fine for every column.
Why is this?
UPDATE
Through some trial and error I've come to the conclusion that I think the issue is that I bring in the data and then have it auto-sort by a certain row. When using a hard coded value, it appears to auto-size the columns after that initial auto-sort, whereas when I use PerformAutoSizeType.VisibleRows it appears to auto-size the columns before the initial auto-sort.

Does PerformAutoResize(PerformAutoSizeType.AllRowsInBand, true); give you the results that you are looking for?
If so then is it possible that when you make the call that the row that you want to size the grid by isn't visible?

Related

DHTMLxGrid 3.0 Issue with sorting and percent width columns

Sorry for no code sample, I can try to get a small sample at some point. But hoping someone has seen this behavior before.
I have a DHTMLxGrid (3.0) that was created from an HTML table. The column widths are set using grid.setColumnWidthsP. When you click on the header to sort the columns, it continually expands the widths of most of the columns. If I remove the setColumnWidthsP and allow the grid to calculate the widths, it works fine. Another issue that might be tied to it, the sort image never appears. Again both items work fine if the column widths are not set by percentages.
Please, check width of your HTML table. if it has the relative sizes it may expand to the parent.
If the problem still occurs for you please, provide any kind of snippet or a complete demo, where the problem can be reconstructed.
You can also try to create a snippet here:
https://snippet.dhtmlx.com/5/

Having trouble with alternate shading and hidden cells in SQL Server Reporting Services

The main method I have for altering the formatting of the final reports is in SQL Server Report Builder.
I have a table within this system which currently is as shown below with some information blacked out.
As shown currently the second line (as shown by 004A) of groupings (referred to as a subsample) comes up with blank areas in the second, third, and fifth columns where the cells have been hidden.
This shading has been done with the following code:
=Iif(Left(Fields!LabSampleNo.Value,3) MOD 2 = 0, "WhiteSmoke", "Transparent")
Is there a way to fix this issue without having to go to coding outside the report builder or by making the fields no longer hidden?
Any help would be great.
As the textboxes are hidden you will not be able to see the backcolor. It is the entire textbox you are hiding, not just it's content.
So the answer to your question is no, you will have to make the textboxes visible again however you can just wrap your value expression inside the same logic as you used to hide the columns.
So, let's say you are hiding the columns based on the first column have non numeric characters and the column you wanted to hide was called myDataColumn then you could do something like...
=IIF(ISNUMERIC(Fields!myFirstColumn.Value), Fields!myDataColumn.Value, "")
Your row's background color expression would remain the same.

ui-grid column alignment is disturbed when I set the minWidth

I am dynamically loading data into my ui-grid, so I do not know the number of columns beforehand. My ui-grid is working properly as long as I do not set the minWidth of the column, but as soon as I set the minWidth, the alignment is disturbed. Data from the rows above is being displayed on the rows below. But when I scroll to the right, the data automatically aligns itself.
I have attached images as this is kind of confusing. I have searched a lot, but could not get an answer anywhere.
I'm not sure which version of ui-grid you are using (your styling looks different).
If you are on the current version, you should be able to use the auto-resize option http://ui-grid.info/docs/#/tutorial/213_auto_resizing which will resize the grid when data is first loaded. It will also resize when you resize the browser.

Can I force a Chart at the top of a report to always be visible

I have the following report:
In Excel I'd use something called Freeze Pane below the chart ....this would mean as the user scrolls down, the table will scroll, but the chart would always remain visible.
Is it possible to implement this behavior in RS?
EDIT
Note: the chart and the tablix use different Datasets
Yes, you can get this going with a bit of tweaking.
With Tablix objects, you have the option to fix header rows, i.e. they will stay at the top of the page when scrolling.
You can set this at the Tablix level:
Or at the row level with Advanced Mode set by using the FixedData property:
So what you can do to take advantage of this is to insert a Chart into those repeating Header rows. I tested this with a basic report:
This did succeed in having the Chart scroll with the Tablix, so will fulfil your requirements. One warning - it didn't look good when I did this (overlapping cells and the like), but it was a report with zero formatting so hopefully this will be helpful for you, anyway.
Edit after comment:
In my simple report example I added a new Dataset to the report, and pointed the embedded Chart to this new Dataset - this didn't work, as every time I did this it would always revert to the old Dataset (i.e. the one specified at the Tablix level).
However, what you can do instead is use a Subreport, which contains the required Chart, and embed this Subreport in the Tablix header. I just tried it now and it worked as required; the Chart using the second Dataset was fine and it scrolled with the Tablix as required.
So it's still a viable option with multiple Datasets, you just need the extra step of using a Subreport:
New report:
Subreport:

Any 3rd party Table like controls for WPF?

I know about Grid. What I don't like about Grid is that I have to specifically index every single row and col. So afterwards, if I want to just move one row or col, I have to go update a ton of xaml.
I tried stackpanel and styles but then even this is a lot of redundant xaml and rearanging the screen still involves then removing/updating styles.
I really like how in an html table, I just start laying out my rows and cols on the fly. If I want to move a row, that's easy, I can just copy paste the xaml to the right spot, nothing else needs to get touched. A col, is a bit harder, but still can be done easily with cut/paste, just needs to be done to every row.
With grid, one may need to touch every single thing in it depending on what's moved.
And what would be really cool, is if one could declare the column width and row heights up above just like a grid. But then as need, provide override values in the actual row,col declaration down below that actually contains the gui elements.
Does anything like this exist?
I've seen implementation of a Grid that infers ColumnDefinitions from usage of attached properties. Its definately doable. You could create an attached property that signifies that this element is the last element of a row.
(See WrapBreakPanel in Pro Silverlight 4 in C# By Matthew MacDonald)
And what would be really cool, is if one could declare the column
width and row heights up above just like a grid. But then as need,
provide override values in the actual row,col declaration down below
that actually contains the gui elements.
Sounds like this could get confusing. What if multiple cells in a row override the height? You can pull this off already with Auto sizing a row and having elements take up more space as needed.

Resources