This is a migrated thread and some comments may be shown as answers.

FlowLayout with NoWrap Items

8 Answers 264 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Xiacon
Top achievements
Rank 1
Xiacon asked on 15 Sep 2017, 09:27 PM

Okay, so my title describes basically what I am looking to do, in terms of ASP.NET/HTML.
I'm hoping to be able to figure a way with someone's help to do this.

A certain report is being bound to a List of instances of a data class.
One of the Fields of this data class is a sub-list of Name/Value pairs - fees - with a short description and a dollar amount.

We do not want to just use a straight List or Table object to represent the fees, because they are mostly short, so this will lead to a huge chunk of dead space to the sides of the list.

We do not want to do a rotated layout with the List or Table going horizontally, because there could easily be 10 or 12 items, which would not fit on the width of the page. Unless the horizontal list/table would actually wrap at the edge of the page, would it?

If the horizontal list/table will NOT wrap at the edge of the page, then what we'd ideally like to do is essentially emulate the function of the ASP.NET Repeater control.

So say that we have the following data:

    Item1, Value1
    Item2, Value2
    Item3, Value3
    Item4, Value4
    Item5, Value5

We'd IDEALLY like to have it layout like this: 

    Item1: Value1; Item2: Value2; Item3: Value3; Item4: Value4; Item5: Value5;

and have it wrap to fit the page. BUT, when it wraps, it needs to keep the matching item/value together, as if they were in an html NOBR tag like so:

    <nobr>Item#: Value#</nobr>

What is the best way to get close to this and approximate this layout?

8 Answers, 1 is accepted

Sort by
0
Xiacon
Top achievements
Rank 1
answered on 15 Sep 2017, 09:44 PM
Just verified that the horizontal List/Table does NOT wrap when it reaches the width of the page, but instead pushes out a whole new page "to the side". So the rotated layout table is not an option.
0
Katia
Telerik team
answered on 20 Sep 2017, 05:23 PM
Hi Xiacon,

You are right, the Table/CrossTab/List item will not wrap at the end of the page but instead will break into a new page.

You can test if the approach suggested in How to: Create Multi-Column Report - Across the Page and Then Down KB article works for you.
The main idea of this approach is to use List item and indexed data to create row and column groups where the grouping expression will define the number of columns.

I hope this information will help you to achieve the desired layout.


Regards,
Katia
Progress Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
0
Xiacon
Top achievements
Rank 1
answered on 20 Sep 2017, 06:41 PM

Oh! That looks like it will be perfect... I was planning an approach like that, but manually segmenting and partitioning my data.

This will basically let the engine do all the heavy lifting, all I need to do is add a sequential index column to the results.

Going to give this a try!!...

0
Xiacon
Top achievements
Rank 1
answered on 21 Sep 2017, 04:51 PM

Ohhhh, actually, not sure this will work directly. The Groupings are ONLY at the top level of the data. I thought you referring to a Groupings property on the List itself, but there is no such property.

The top level of my data is 1:1, there should be no grouping on that. I need to display this across-then-down data view of one of the subsets of data of my top-level data class.

So it seems to use this approach, I would need to use a sub-report. Which may work, but it's not as straight-forward as I was thinking it seemed.

0
Xiacon
Top achievements
Rank 1
answered on 21 Sep 2017, 05:40 PM
Oh, no, I found the grouping bit... cool! Not there yet, but getting close...
0
Xiacon
Top achievements
Rank 1
answered on 21 Sep 2017, 07:56 PM

Hi Katia, or whoever else may see this and can help. I've got the report Almost working now, with the grouping on the List control. There's just one formatting problem which I'm running into, but it is like 98% of the way there now!

It is running the items across the page, and then wrapping as expected. However, each horizontal item is getting pushed down one row, as if they items are overlapping or something. The attached file arrearsBad.png show how it is coming out. The file arrearsGood.png shows how it SHOULD be coming out.

I've put the code files for this report up for you to download them in case you need to look at the designer layout.They are here: http://downloads.xiacon.com/telerik/CaseStatus.20170921.zip since we can't upload zip files in the forums.

0
Accepted
Katia
Telerik team
answered on 26 Sep 2017, 10:49 AM
Hi Xiacon,

Based on the attached screen shots, it seems that the issue is caused by the grouping expressions set for the List item (the data field might not have the correct indexes).
You can attach screen shots of the Group Explorer showing the groupings of the List item and the data you have.

The recommended way to send the projects is in a suport ticket (add it as the attachment to the ticket). Your current subscription allows you to open a support ticket.


Regards,
Katia
Progress Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
0
Xiacon
Top achievements
Rank 1
answered on 27 Sep 2017, 05:22 PM

BAM! Yes, it was a problem in my grouping expressions. Played around a little bit, and got it working, once pointed in the right direction. First time using this grouping functionality. Now that I understand it, quite impressed and happy with it!

Thanks for all your help Katia!

Tags
General Discussions
Asked by
Xiacon
Top achievements
Rank 1
Answers by
Xiacon
Top achievements
Rank 1
Katia
Telerik team
Share this question
or