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

Scrolling : only horizontal scrolling needed

2 Answers 107 Views
ListView
This is a migrated thread and some comments may be shown as answers.
George C.
Top achievements
Rank 2
Iron
Veteran
George C. asked on 04 Apr 2020, 06:45 PM

Greetings,

I'm using a RadListview as a sequential timeline, so I want to make it look like a linear timeline.

I've written these lines to make sure that only horizontal scrolling is allowed (also did some changes via Smart Tag) :

Timeline.VerticalScrollState = ScrollState.AlwaysHide
Timeline.HorizontalScrollState = ScrollState.AlwaysShow
Timeline.VerticalScroll.Enabled = False
Timeline.VerticalScroll.Visible = True
Timeline.HorizontalScroll.Enabled = True
Timeline.HorizontalScroll.Visible = True

 

But no success! It still looks like it vertically adds items. Check out the gif I've attached.

 

 

2 Answers, 1 is accepted

Sort by
0
George C.
Top achievements
Rank 2
Iron
Veteran
answered on 04 Apr 2020, 06:49 PM
after adding 17 items , shown in the gif, it doesn't keep adding items horizontally (it actually adds items programmatically horizontal, but it looks like a vertical listview).
0
Accepted
Nadya | Tech Support Engineer
Telerik team
answered on 08 Apr 2020, 01:07 PM

Hello George,

I suppose that you use ListViewType.IconsView type. You can use the Orientation property of the IconsListViewElement to control the flow direction of the items in the list view. Here is an example:

public RadForm1()
        {
            InitializeComponent();

            this.radListView1.ViewType = ListViewType.IconsView;
            IconListViewElement iconsViewElement = this.radListView1.ListViewElement.ViewElement as IconListViewElement;
            iconsViewElement.Orientation = Orientation.Horizontal;
        }

I hope this helps. If you need any further assistance please don't hesitate to contact me. 

Regards,
Nadya
Progress Telerik

Progress is here for your business, like always. Read more about the measures we are taking to ensure business continuity and help fight the COVID-19 pandemic.
Our thoughts here at Progress are with those affected by the outbreak.
Tags
ListView
Asked by
George C.
Top achievements
Rank 2
Iron
Veteran
Answers by
George C.
Top achievements
Rank 2
Iron
Veteran
Nadya | Tech Support Engineer
Telerik team
Share this question
or