Hi ramco1917,
You need to use DataList instead of Repeater control. Inside the DataList control you need to set RepeatDirection to Horizontal and RepeatColumns to 4.
Please refer below sample.
Note: For this sample i have used temporary DataTable. For more details refer How to create Temporary Table in ASP.Net using C# and VB.Net.
HTML
<asp:DataList ID="dlDetails" runat="server" RepeatDirection="Horizontal" RepeatColumns="4">
<ItemTemplate>
<div>
Price -
<asp:Label ID="lblPrice" runat="server" Text='<%#Eval("Price") %>'></asp:Label>
<br />
<asp:CheckBox runat="server" />
 
<asp:Label ID="lblYear" runat="server" Text='<%#Eval("Year") %>'></asp:Label>
</div>
</ItemTemplate>
</asp:DataList>
Namespace
C#
using System.Data;
VB.Net
Imports System.Data
Code
C#
protected void Page_Load(object sender, EventArgs e)
{
if (!this.IsPostBack)
{
this.BindDataList();
}
}
private void BindDataList()
{
DataTable dt = new DataTable();
dt.Columns.AddRange(new DataColumn[2] {
new DataColumn("Price"),
new DataColumn("Year")});
dt.Rows.Add("15000", "12 months");
dt.Rows.Add("10000", "9 months");
dt.Rows.Add("7500", "6 months");
dt.Rows.Add("5000", "3 months");
dlDetails.DataSource = dt;
dlDetails.DataBind();
}
VB.Net
Protected Sub Page_Load(ByVal sender As Object, ByVal e As EventArgs) Handles Me.Load
If Not Me.IsPostBack Then
Me.BindDataList()
End If
End Sub
Private Sub BindDataList()
Dim dt As DataTable = New DataTable()
dt.Columns.AddRange(New DataColumn(1) {
New DataColumn("Price"),
New DataColumn("Year")})
dt.Rows.Add("15000", "12 months")
dt.Rows.Add("10000", "9 months")
dt.Rows.Add("7500", "6 months")
dt.Rows.Add("5000", "3 months")
dlDetails.DataSource = dt
dlDetails.DataBind()
End Sub
Screenshot