crosstab1.RowGroups.Clear();crosstab1.ColumnGroups.Clear();crosstab1.Body.Columns.Clear();crosstab1.Body.Rows.Clear();crosstab1.Items.Clear();crosstab1.Corner.ClearCellContent();crosstab1.Body.Columns.Add(new TableBodyColumn(new Unit(2D, UnitType.Inch)));crosstab1.Body.Columns.Add(new TableBodyColumn(new Unit(2D, UnitType.Inch)));crosstab1.Body.Rows.Add(new TableBodyRow(new Unit(0.26D, UnitType.Inch)));TextBox txtBx = new TextBox() { Size = new SizeU(new Unit(2D, UnitType.Inch), new Unit(0.26D, UnitType.Inch)), Value = "=Fields.Jun2011" };crosstab1.Items.Add(txtBx);crosstab1.Body.SetCellContent(0, 0, txtBx);txtBx = new TextBox() { Size = new SizeU(new Unit(2D, UnitType.Inch), new Unit(0.26D, UnitType.Inch)), Value = "=Fields.Jul2011" };crosstab1.Items.Add(txtBx);crosstab1.Body.SetCellContent(0, 1, txtBx);TableGroup group1 = new TableGroup();group1.Groupings.Add(new Telerik.Reporting.Data.Grouping("=\'ColumnGroup\'"));txtBx = new TextBox() { Size = new SizeU(new Unit(2D, UnitType.Inch), new Unit(0.26D, UnitType.Inch)), Value = "June 2011" };crosstab1.Items.Add(txtBx);group1.ReportItem = txtBx;TableGroup group2 = new TableGroup();txtBx = new TextBox() { Size = new SizeU(new Unit(2D, UnitType.Inch), new Unit(0.26D, UnitType.Inch)), Value = "July 2011" };crosstab1.Items.Add(txtBx);group2.ReportItem = txtBx;crosstab1.ColumnGroups.Add(group1);crosstab1.ColumnGroups.Add(group2);txtBx = new TextBox() { Size = new SizeU(new Unit(2D, UnitType.Inch), new Unit(0.26D, UnitType.Inch)), Value = "Project Name" };crosstab1.Items.Add(txtBx);crosstab1.Corner.SetCellContent(0, 0, txtBx);txtBx = new TextBox() { Size = new SizeU(new Unit(2D, UnitType.Inch), new Unit(0.26D, UnitType.Inch)), Value = "Type Of Financial" };crosstab1.Items.Add(txtBx);crosstab1.Corner.SetCellContent(0, 1, txtBx);TableGroup group4 = new TableGroup();group4.Groupings.Add(new Telerik.Reporting.Data.Grouping("=Fields.TypeOfFinancial"));txtBx = new TextBox() { Size = new SizeU(new Unit(2D, UnitType.Inch), new Unit(0.26D, UnitType.Inch)), Value = "=Fields.TypeOfFinancial" };crosstab1.Items.Add(txtBx);group4.ReportItem = txtBx;group4.Sortings.Add(new Telerik.Reporting.Data.Sorting("=Fields.TypeOfFinancial", Telerik.Reporting.Data.SortDirection.Asc));TableGroup group3 = new TableGroup();group3.ChildGroups.Add(group4);group3.Groupings.Add(new Telerik.Reporting.Data.Grouping("=Fields.ProjectName"));txtBx = new TextBox() { Size = new SizeU(new Unit(2D, UnitType.Inch), new Unit(0.26D, UnitType.Inch)), Value = "=Fields.ProjectName" };crosstab1.Items.Add(txtBx);group3.ReportItem = txtBx;crosstab1.RowGroups.Add(group3);crosstab1.DataSource = ConstructDataTable();I have a senario similar to this:
class CarManufacture{
String Name { get; set; }
String Description { get; set; } List<Model> CarModels { get; set; } List<Model> TruckModels { get; set; }}class Model{ string ModelName { get; set; }}
The list of Manufactures will be the datasource, and it won't be a fixed count. What I want to do is show the Manufactures horizontally, and below them, the lists of cars and trucks. So something like this:
Chevrolet Ford Nissan
[Description] [Discription] [Description]
Cars Malibu Mustang Altima
Impala Fusion Maxima
Camaro Versa
Trucks Colorado F150 Titan
Silverado F250
How can I accomplish this? I'm trying with a CrossTab, but can't quite figure it out. Are there any examples of something like this?
Private Sub GoalCompare_NeedDataSource(ByVal sender As Object, ByVal e As System.EventArgs)...Dim o As MIBEntitiesModel = New MIBEntitiesModel(My.Settings.MIBConnection)Dim gc As System.Linq.IQueryable(Of MIB1.VwMIB_GoalCompare) = Nothinggc = From m In o.VwMIB_GoalCompares Select mIf iSelectedLevel = enSelectedLevel.DSC Then gc = gc.Where(Function(x) x.DistrictWN.Equals(sDSCWN) AndAlso x.Year.Equals(iThisYear) AndAlso x.Week.Equals(iThisWeek))ElseIf iSelectedLevel = enSelectedLevel.RSC Then gc = gc.Where(Function(x) x.RegionalWN.Equals(sRSCWN) AndAlso x.Year.Equals(iThisYear) AndAlso x.Week.Equals(iThisWeek))ElseIf iSelectedLevel = enSelectedLevel.SSC Then gc = gc.Where(Function(x) x.StateWN.Equals(sSSCWN) AndAlso x.Year.Equals(iThisYear) AndAlso x.Week.Equals(iThisWeek))End Ifgc = gc.OrderBy(Function(x) x.LevelID).ThenBy(Function(x) x.UserID).ThenBy(Function(x) x.RowCategoryID)For Each g In gc...Next...End Sub