I have a page with a simple dropdown and repeater control in page.on submit repeater control is bound to datasource1 which has 3 columns.
With bootstrap and datatables.net plugins
protected void rptReport_ItemDataBound(object sender, RepeaterItemEventArgs e)
{
if (e.Item.ItemType == ListItemType.Header)
{
Repeater headerRepeater = e.Item.FindControl("Header1") as Repeater;
headerRepeater.DataSource = dtOrder.Columns;
headerRepeater.DataBind();
}
if (e.Item.ItemType == ListItemType.Item || e.Item.ItemType == ListItemType.AlternatingItem)
{
Repeater columnRepeater = e.Item.FindControl("Item1") as Repeater;
var row = e.Item.DataItem as System.Data.DataRowView;
columnRepeater.DataSource = row.Row.ItemArray;
columnRepeater.DataBind();
}
}
<%# Container.DataItem %>
<%# Container.DataItem %>