Hi Richa,
Handle it from DataTable.
Check the below example.
HTML
<table width="100%" class="slide_table" cellpadding="2">
<tr>
<td colspan="2" align="center">Basic Data
</td>
</tr>
<asp:Repeater ID="rptBD" runat="server">
<ItemTemplate>
<tr>
<td align="left" runat="server"><%# Eval("Description") %></td>
<td align="center" runat="server"><%# Eval("Data") %></td>
</tr>
</ItemTemplate>
</asp:Repeater>
</table>
Code
C#
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
System.Data.DataTable dt = new System.Data.DataTable();
dt.Columns.AddRange(new System.Data.DataColumn[] {
new System.Data.DataColumn("Description"),
new System.Data.DataColumn("Data") });
dt.Rows.Add("Test 1", "1.1");
dt.Rows.Add("Test 2", "2");
dt.Rows.Add("Test 3", "3");
dt.Rows.Add("Test 4", "1.2");
dt.Rows.Add("Test 5", "3.0");
dt.Rows.Add("Test 6", "5");
dt.Rows.Add("Test 7", "2");
dt.Rows.Add("Test 8", "1");
dt.Rows.Add("Test 9", "4");
dt.Rows.Add("Test 10", "7");
dt.Rows[2]["Description"] = dt.Rows[2]["Description"] + "<br/>" + dt.Rows[3]["Description"];
dt.Rows[2]["Data"] = dt.Rows[2]["Data"] + "<br/>" + dt.Rows[3]["Data"];
dt.Rows[6]["Description"] = dt.Rows[6]["Description"] + "<br/>" + dt.Rows[7]["Description"];
dt.Rows[6]["Data"] = dt.Rows[6]["Data"] + "<br/>" + dt.Rows[7]["Data"];
dt.Rows[3].Delete();
dt.Rows[7].Delete();
rptBD.DataSource = dt;
rptBD.DataBind();
}
}
VB.Net
Protected Sub Page_Load(ByVal sender As Object, ByVal e As EventArgs) Handles Me.Load
If Not IsPostBack Then
Dim dt As System.Data.DataTable = New System.Data.DataTable()
dt.Columns.AddRange(New System.Data.DataColumn() {
New System.Data.DataColumn("Description"),
New System.Data.DataColumn("Data")})
dt.Rows.Add("Test 1", "1.1")
dt.Rows.Add("Test 2", "2")
dt.Rows.Add("Test 3", "3")
dt.Rows.Add("Test 4", "1.2")
dt.Rows.Add("Test 5", "3.0")
dt.Rows.Add("Test 6", "5")
dt.Rows.Add("Test 7", "2")
dt.Rows.Add("Test 8", "1")
dt.Rows.Add("Test 9", "4")
dt.Rows.Add("Test 10", "7")
dt.Rows(2)("Description") = dt.Rows(2)("Description") & "<br/>" & dt.Rows(3)("Description")
dt.Rows(2)("Data") = dt.Rows(2)("Data") & "<br/>" & dt.Rows(3)("Data")
dt.Rows(6)("Description") = dt.Rows(6)("Description") & "<br/>" & dt.Rows(7)("Description")
dt.Rows(6)("Data") = dt.Rows(6)("Data") & "<br/>" & dt.Rows(7)("Data")
dt.Rows(3).Delete()
dt.Rows(7).Delete()
rptBD.DataSource = dt
rptBD.DataBind()
End If
End Sub
Screenshot