DHTMLxGrid 3.0 Issue with sorting and percent width columns - salesforce

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/

Related

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.

Having issues with Infragistics column resizing

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?

Auto resize DataGrid column to content

When column width is set to auto in DataGrid, the column only seem to be able to grow, never shrink in size.
I would like the column to always resize to the actual content of the column.
My question is similar to this one.
Except I would like the resizing to happens automatically when content changes, without having to explicit execute some code.
Also I would like it to be flicker free and fast or if I'm asking the impossible, then almost flicker free and fast at least :-)
I found a link which seems helpful, http://forums.silverlight.net/t/71184.aspx. But I can't find DesiredWidth property in the code...

SSRS: Report label position dynamic

I have a report which displays customer address in multiple labels.
My customers use windowed envelopes for mailing. I need the address labels position to be configurable.
Something like, I'll have a database table which stores the Top/Left position of each label per customer. Based on this table, I need to position the address labels on my report.
I thought, it is doable by expressions, but Location property doesn't provides ability to set an expression and make the label's top and left dynamic.
Anybody, any ideas, on how to achieve this?
As you mentioned, you cannot set an expression for location property. I want to do this before but it seems that there is no solution for this work.
Sorry for the duplicate post
I had the same problem as you did. I got around the problem by using an old HTML trick. It involves using a transparent.gif in an image. You put your image (linked to the gif), then put your label on top. Using a parameter, you can toggle which item to appear by setting an expression in the hidden property for both controls.
As stated by others, it isn't supported. However, here are two ugly work around possible for basic reporting.
Work around with padding.
You can't set formula on the label's location, but you can use padding option instead.
So you can set the label as wide as the report and as tall as the region.
Also, set the label's horizontal alignment to "Left" and Vertical alignment to "Top".
Then, add a formula in left and top paddings to offset the text.
You can also achieve a right aligned offsetted label by setting the Horizontal alignment to "right" and using right padding instead of the left one to offset the field from the right. With the same recipe, you can offset from the bottom by using "bottom" vertical alignment and bottom padding.
The ugly side:
This method will create a mess in the report designer as all dynamic label will overlap each other and take all the space over static label. Also, please note that with this method, you won't be able to do fancy stuff like adding borders around the text and hyperlinks.
Work around with sub report.
If the number of different positions for the label(s) are really low. You can create a subreport for each possibility and use a formula to display the right subreport for the right case. Sadly, this doesn't work for labels in the header as subreport aren't allowed there.
No solution, as it is not supported!!!
From MS online community support...
"As far as I know, the position of the textbox in the report is static not dynamic, so it will not shift to left."
Reference: http://forums.asp.net/t/1433297.aspx

Why don't my scrollbars work properly when programmatically hiding rows in silverlight Datagrid?

I have a Silverlight datagrid with custom code that allows for +/- buttons on the lefthand side and can display a table with a tree structure. The +/- buttons are bound to a IsExpanded property on my ViewModelRows, as I call them. The visibility of rows is bound to an IsVisible property on the ViewModelRows which is determined based on whether or not all of the parent rows are expanded. Straightforward enough.
This code works fine in that if I scroll up and down the grid with PageUp/PageDown or the arrow keys, all the right rows are hidden and everything has the right structure and I can play with the +/- buttons to my hearts content. However, the vertical scroll bar on the right hand side, although it starts off the correct size and it scrolls through the rows smoothly, when I collapse rows and then re-expand them, doesn't go back to its correct size. The scrollbar can still usually be moved around to scroll through the whole collection, but because it is too big, once the bar moves to the bottom, there are still more rows to go through and it sort of jerkily shoots all the way down to the bottom or sometimes fails to scroll at all. This is pretty hard to describe so I included a screenshot with the black lines drawn on to show the difference in scrollbar length even though the two grids have the same number of rows expanded.
I think this might be a bug related to the way the Datagrid does virtualization of rows. It seems to me like it isn't properly keeping track of how tall each row is supposed to be when expansion states change. Is there a way to programmatically "poke" (read hack) it to recalculate its scrollbar size on LoadingRow or something ugly like that? I'd include a code sample but there's 2 c# files and 1 xaml file so I wanted to see if anyone else has heard of this sort of issue before I try to make it reproducible in a self-contained way. Once again, scrolling with the arrow keys works fine so I'm pretty sure the underlying logic and binding is working, there's just some issue with the row height not being calculated properly.
Since I'm a new user, it won't let me use image tags so here's the link to a picture of the problem:
http://img210.imageshack.us/img210/8760/messedupscrollbars.png
This is a known issue according to what I read today (and is apparently still an issue in the as-yet-unreleased Silverlight 4):
http://forums.silverlight.net/forums/p/153997/343790.aspx

Resources