4 Answers, 1 is accepted
0
Hello Liji,
You can find the required information in our RadListView-related help topics.
Custom layouts
Predefined layouts
Declarative definition
Sample code for RadListView with 4 columns:
Kind regards,
Daniel
the Telerik team
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 Public Issue Tracking system and vote to affect the priority of the items.
You can find the required information in our RadListView-related help topics.
Custom layouts
Predefined layouts
Declarative definition
Sample code for RadListView with 4 columns:
<
telerik:RadListView
runat
=
"server"
ID
=
"TelerikListView1"
DataSourceID
=
"SqlDataSource1"
DataKeyNames
=
"CustomerID"
>
<
LayoutTemplate
>
<
table
style
=
"width: 730px; background-color: #D9DFDF;"
>
<
tr
>
<
th
id
=
"Th1"
runat
=
"server"
>
CustomerID
</
th
>
<
th
id
=
"Th2"
runat
=
"server"
>
CompanyName
</
th
>
<
th
id
=
"Th3"
runat
=
"server"
>
ContactName
</
th
>
<
th
id
=
"Th4"
runat
=
"server"
>
ContactTitle
</
th
>
</
tr
>
<
tr
runat
=
"server"
id
=
"itemPlaceholder"
/>
</
table
>
</
LayoutTemplate
>
<
ItemTemplate
>
<
tr
id
=
"Tr2"
runat
=
"server"
bgcolor
=
"#99ccff"
>
<
td
>
<
asp:Label
ID
=
"CustomerID"
runat
=
"Server"
Text='<%#Eval("CustomerID") %>' />
</
td
>
<
td
valign
=
"top"
>
<
asp:Label
ID
=
"CompanyName"
runat
=
"Server"
Text='<%#Eval("CompanyName") %>' />
</
td
>
<
td
valign
=
"top"
>
<
asp:Label
ID
=
"ContactName"
runat
=
"Server"
Text='<%#Eval("ContactName") %>' />
</
td
>
<
td
valign
=
"top"
>
<
asp:Label
ID
=
"ContactTitle"
runat
=
"Server"
Text='<%#Eval("ContactTitle") %>' />
</
td
>
</
tr
>
</
ItemTemplate
>
</
telerik:RadListView
>
<
asp:SqlDataSource
ID
=
"SqlDataSource1"
runat
=
"server"
ConnectionString="<%$ ConnectionStrings:NorthwindConnectionString %>"
SelectCommand="SELECT TOP(10) [CustomerID], [CompanyName], [ContactName], [ContactTitle] FROM [Customers]" />
Kind regards,
Daniel
the Telerik team
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 Public Issue Tracking system and vote to affect the priority of the items.
0
Liji Jose
Top achievements
Rank 1
answered on 01 Mar 2010, 07:04 AM
Hi Daniel,
Thanks for your response. ...
But, what I asked was how to get multiple records in a single row, jus like the sample ListView in your help document.
Apart from the given style, can I explicitly set the number of records(column-wise) for a row?
Please reply me...
-Liji Jose
0
Hello Liji,
Although RadListView can successfully mimic RadGrid, it is actually a different control - RadListView is not bound to the "grid" layout, so the term "columns" is a bit relative in this case.
As you can see from the sample code in my previous post, the number of columns (in this layout) is equal to the number of cells in the given row.
However, if you use grouping, the number of your columns will be equal to the GroupItemCount property.
Basic grouping demo
Basic grouping help topic
Please examine the following demos to get familiar with some of the possible layouts:
RadListView First Look demo
RadListView Custom paging demo
RadListView Basic sorting demo
RadListView Custom sorting demo
RadListView Predefined layouts
RadListView Custom layouts
Best regards,
Daniel
the Telerik team
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 Public Issue Tracking system and vote to affect the priority of the items.
Although RadListView can successfully mimic RadGrid, it is actually a different control - RadListView is not bound to the "grid" layout, so the term "columns" is a bit relative in this case.
As you can see from the sample code in my previous post, the number of columns (in this layout) is equal to the number of cells in the given row.
However, if you use grouping, the number of your columns will be equal to the GroupItemCount property.
Basic grouping demo
Basic grouping help topic
Please examine the following demos to get familiar with some of the possible layouts:
RadListView First Look demo
RadListView Custom paging demo
RadListView Basic sorting demo
RadListView Custom sorting demo
RadListView Predefined layouts
RadListView Custom layouts
Best regards,
Daniel
the Telerik team
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 Public Issue Tracking system and vote to affect the priority of the items.
0
Setiawan
Top achievements
Rank 1
answered on 29 Nov 2019, 09:19 AM
I think the secret is in how you layout the data on the <itemTemplate>.
If you use flexbox, it's gonna display x number of records according to your PageSize.