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

New to ListView, need guidance on formatting options

3 Answers 80 Views
ListView
This is a migrated thread and some comments may be shown as answers.
Tomica
Top achievements
Rank 2
Tomica asked on 19 Sep 2015, 05:44 PM

I've been spoiled by GridView!

I have need for something simpler, just basic 2-column lists, no paging, no complex templating, just a list with scrolling as needed.

The attached graphic shows an approximation of what I need. I manipulated height and width settings and was partially successful in creating an outline, but as you can see, instead of scrollbars I get overflow.

 I am thinking that maybe I need to embed the ListView control inside a panel or other object to force scrollbars, but then presume the headings themselves will also scroll out of view.

 Question 1) is there a better RAD AJAX control?

 Question 2) why to the height and width settings have very little effect on this control, when they are spectacular with GridView? 

 

      <telerik:RadListView ID="RadListView1" runat="server" DataSourceID="publication_date_summary" BorderColor="#3399FF" BorderStyle="Solid" BorderWidth="2px" Height="200px" Skin="Metro" Width="300px"><LayoutTemplate>
        <div class="RadListView RadListView_Metro" style="max-width:140px; max-height:300px;">
            <table cellspacing="0"">
                <thead>
                    <tr class="rlvHeader">
                        <th style="width:100px;">Decade</th>
                        <th style="width:40px;">Songs</th>
                    </tr>
                </thead>
                <tbody>
                    <tr id="itemPlaceholder" runat="server">
                    </tr>
                </tbody>
            </table>
        </div>
</LayoutTemplate>
        <ItemTemplate>
            <tr class="rlvI">
                <td>
<%--                    <asp:Label ID="NameLabel" runat="server" Text='<%# Eval("Name") %>' />--%>
                                   <a href='selector.aspx?class_id=5&filter=decade&decade=<%# Eval("pub_date")%>' target="_parent"><%# Eval("pub_date") %></a>
                </td>
                <td>
                    <asp:Label ID="CountOfIDLabel" runat="server" Text='<%# Eval("songs") %>' />
                </td>
            </tr>
        </ItemTemplate>
        <EmptyDataTemplate>
            <div class="RadListView RadListView_MetroTouch">
                <div class="rlvEmpty">
                    There are no items to be displayed.</div>
            </div>
        </EmptyDataTemplate>
 
    </telerik:RadListView>

 

 


 

3 Answers, 1 is accepted

Sort by
0
Maria Ilieva
Telerik team
answered on 23 Sep 2015, 12:25 PM
Hi Tomica,

You can try achieving this with the following CSS rule
.RadListView
{
    overflow: auto;
    height: 200px;
    width: 450px;
}

I hope this helps.


Regards,
Maria Ilieva
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
Tomica
Top achievements
Rank 2
answered on 23 Sep 2015, 05:43 PM

Yes, this works just fine. Overflow!

 It's amazing how much I have forgotten now that the UI code handles all the messy details like these.

0
Maria Ilieva
Telerik team
answered on 28 Sep 2015, 10:43 AM
Hi,

I'm glad that the provided solution works for you. Do not hesitate to contact us back ion case further assistance is needed.

Regards,
Maria Ilieva
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
Tags
ListView
Asked by
Tomica
Top achievements
Rank 2
Answers by
Maria Ilieva
Telerik team
Tomica
Top achievements
Rank 2
Share this question
or