Hey there,
I've been looking around for ages and just can't seem to find anything that resembles the problem I have (Or I'm not looking for the right things). This is also why the title is so vague. I just don't know what's going wrong exactly
I'm trying to build hierarchy in a grid. At first I tried to create one programmatically. That one ended up looking like the image attached. So, I thought, perhaps I ended up making an error, thus I tried creating the intended grid through the property builder. But that one too ended up looking like attached image.
The designer code is as followed:
<Global.Microsoft.VisualBasic.CompilerServices.DesignerGenerated()> _
Partial
Class
SetsForm
Inherits
Telerik.WinControls.UI.RadForm
'Form overrides dispose to clean up the component list.
<System.Diagnostics.DebuggerNonUserCode()> _
Protected
Overrides
Sub
Dispose(
ByVal
disposing
As
Boolean
)
Try
If
disposing
AndAlso
components IsNot
Nothing
Then
components.Dispose()
End
If
Finally
MyBase
.Dispose(disposing)
End
Try
End
Sub
'Required by the Windows Form Designer
Private
components
As
System.ComponentModel.IContainer
'NOTE: The following procedure is required by the Windows Form Designer
'It can be modified using the Windows Form Designer.
'Do not modify it using the code editor.
<System.Diagnostics.DebuggerStepThrough()> _
Private
Sub
InitializeComponent()
Dim
GridViewComboBoxColumn1
As
Telerik.WinControls.UI.GridViewComboBoxColumn =
New
Telerik.WinControls.UI.GridViewComboBoxColumn()
Dim
GridViewTextBoxColumn1
As
Telerik.WinControls.UI.GridViewTextBoxColumn =
New
Telerik.WinControls.UI.GridViewTextBoxColumn()
Dim
GridViewTextBoxColumn2
As
Telerik.WinControls.UI.GridViewTextBoxColumn =
New
Telerik.WinControls.UI.GridViewTextBoxColumn()
Dim
GridViewTextBoxColumn3
As
Telerik.WinControls.UI.GridViewTextBoxColumn =
New
Telerik.WinControls.UI.GridViewTextBoxColumn()
Dim
SortDescriptor1
As
Telerik.WinControls.Data.SortDescriptor =
New
Telerik.WinControls.Data.SortDescriptor()
Dim
GridViewRelation1
As
Telerik.WinControls.UI.GridViewRelation =
New
Telerik.WinControls.UI.GridViewRelation()
Dim
resources
As
System.ComponentModel.ComponentResourceManager =
New
System.ComponentModel.ComponentResourceManager(
GetType
(SetsForm))
Dim
GridViewTextBoxColumn4
As
Telerik.WinControls.UI.GridViewTextBoxColumn =
New
Telerik.WinControls.UI.GridViewTextBoxColumn()
Dim
GridViewTextBoxColumn5
As
Telerik.WinControls.UI.GridViewTextBoxColumn =
New
Telerik.WinControls.UI.GridViewTextBoxColumn()
Dim
GridViewTextBoxColumn6
As
Telerik.WinControls.UI.GridViewTextBoxColumn =
New
Telerik.WinControls.UI.GridViewTextBoxColumn()
Dim
GridViewTextBoxColumn7
As
Telerik.WinControls.UI.GridViewTextBoxColumn =
New
Telerik.WinControls.UI.GridViewTextBoxColumn()
Me
.RadGridView1 =
New
Telerik.WinControls.UI.RadGridView()
Me
.GridViewTemplate1 =
New
Telerik.WinControls.UI.GridViewTemplate()
CType
(
Me
.RadGridView1, System.ComponentModel.ISupportInitialize).BeginInit()
CType
(
Me
.RadGridView1.MasterTemplate, System.ComponentModel.ISupportInitialize).BeginInit()
CType
(
Me
.GridViewTemplate1, System.ComponentModel.ISupportInitialize).BeginInit()
CType
(
Me
, System.ComponentModel.ISupportInitialize).BeginInit()
Me
.SuspendLayout()
'
'RadGridView1
'
Me
.RadGridView1.AutoGenerateHierarchy =
True
Me
.RadGridView1.BackColor = System.Drawing.Color.FromArgb(
CType
(
CType
(191,
Byte
),
Integer
),
CType
(
CType
(219,
Byte
),
Integer
),
CType
(
CType
(255,
Byte
),
Integer
))
Me
.RadGridView1.Cursor = System.Windows.Forms.Cursors.
Default
Me
.RadGridView1.Dock = System.Windows.Forms.DockStyle.Fill
Me
.RadGridView1.EnterKeyMode = Telerik.WinControls.UI.RadGridViewEnterKeyMode.EnterMovesToNextCell
Me
.RadGridView1.Font =
New
System.Drawing.Font(
"Segoe UI"
, 8.25!)
Me
.RadGridView1.ForeColor = System.Drawing.Color.Black
Me
.RadGridView1.ImeMode = System.Windows.Forms.ImeMode.NoControl
Me
.RadGridView1.Location =
New
System.Drawing.Point(0, 72)
'
'RadGridView1
'
Me
.RadGridView1.MasterTemplate.AllowColumnReorder =
False
Me
.RadGridView1.MasterTemplate.AllowDragToGroup =
False
Me
.RadGridView1.MasterTemplate.AutoGenerateColumns =
False
Me
.RadGridView1.MasterTemplate.AutoSizeColumnsMode = Telerik.WinControls.UI.GridViewAutoSizeColumnsMode.Fill
GridViewComboBoxColumn1.AllowGroup =
False
GridViewComboBoxColumn1.EnableExpressionEditor =
False
GridViewComboBoxColumn1.FieldName =
"ProductSet_CompanyID"
GridViewComboBoxColumn1.HeaderText =
"Bedrijf"
GridViewComboBoxColumn1.Name =
"ProductSet_CompanyID"
GridViewComboBoxColumn1.Width = 93
GridViewTextBoxColumn1.AllowGroup =
False
GridViewTextBoxColumn1.EnableExpressionEditor =
False
GridViewTextBoxColumn1.FieldName =
"ProductSet_SetReference"
GridViewTextBoxColumn1.HeaderText =
"Set-Referentie"
GridViewTextBoxColumn1.MaxLength = 50
GridViewTextBoxColumn1.Name =
"ProductSet_SetReference"
GridViewTextBoxColumn1.Width = 139
GridViewTextBoxColumn2.FieldName =
"ProductSet_SetName"
GridViewTextBoxColumn2.HeaderText =
"Set-Naam"
GridViewTextBoxColumn2.MaxLength = 255
GridViewTextBoxColumn2.Name =
"ProductSet_SetName"
GridViewTextBoxColumn2.Width = 417
GridViewTextBoxColumn3.FieldName =
"ProductSet_ID"
GridViewTextBoxColumn3.HeaderText =
"column1"
GridViewTextBoxColumn3.IsVisible =
False
GridViewTextBoxColumn3.Name =
"ProductSet_ID"
GridViewTextBoxColumn3.SortOrder = Telerik.WinControls.UI.RadSortOrder.Ascending
GridViewTextBoxColumn3.Width = 47
Me
.RadGridView1.MasterTemplate.Columns.AddRange(
New
Telerik.WinControls.UI.GridViewDataColumn() {GridViewComboBoxColumn1, GridViewTextBoxColumn1, GridViewTextBoxColumn2, GridViewTextBoxColumn3})
Me
.RadGridView1.MasterTemplate.EnableFiltering =
True
Me
.RadGridView1.MasterTemplate.EnableGrouping =
False
SortDescriptor1.PropertyName =
"ProductSet_ID"
Me
.RadGridView1.MasterTemplate.SortDescriptors.AddRange(
New
Telerik.WinControls.Data.SortDescriptor() {SortDescriptor1})
Me
.RadGridView1.MasterTemplate.Templates.AddRange(
New
Telerik.WinControls.UI.GridViewTemplate() {
Me
.GridViewTemplate1})
Me
.RadGridView1.Name =
"RadGridView1"
GridViewRelation1.ChildColumnNames =
CType
(resources.GetObject(
"GridViewRelation1.ChildColumnNames"
), System.Collections.Specialized.StringCollection)
GridViewRelation1.ChildTemplate =
Me
.GridViewTemplate1
GridViewRelation1.ParentColumnNames =
CType
(resources.GetObject(
"GridViewRelation1.ParentColumnNames"
), System.Collections.Specialized.StringCollection)
GridViewRelation1.ParentTemplate =
Me
.RadGridView1.MasterTemplate
GridViewRelation1.RelationName =
"SetProductRelation"
Me
.RadGridView1.Relations.AddRange(
New
Telerik.WinControls.UI.GridViewRelation() {GridViewRelation1})
Me
.RadGridView1.RightToLeft = System.Windows.Forms.RightToLeft.No
Me
.RadGridView1.ShowGroupPanel =
False
Me
.RadGridView1.Size =
New
System.Drawing.Size(668, 313)
Me
.RadGridView1.TabIndex = 0
Me
.RadGridView1.Text =
"3"
Me
.RadGridView1.UseScrollbarsInHierarchy =
True
'
'GridViewTemplate1
'
Me
.GridViewTemplate1.AutoGenerateColumns =
False
Me
.GridViewTemplate1.AutoSizeColumnsMode = Telerik.WinControls.UI.GridViewAutoSizeColumnsMode.Fill
GridViewTextBoxColumn4.FieldName =
"ProductSetProduct_ID"
GridViewTextBoxColumn4.HeaderText =
"ID"
GridViewTextBoxColumn4.Name =
"ProductSetProduct_ID"
GridViewTextBoxColumn5.FieldName =
"ProductSetProduct_SetID"
GridViewTextBoxColumn5.HeaderText =
"SetID"
GridViewTextBoxColumn5.IsVisible =
False
GridViewTextBoxColumn5.Name =
"ProductSetProduct_SetID"
GridViewTextBoxColumn6.FieldName =
"ProductSetProduct_ProductReference"
GridViewTextBoxColumn6.HeaderText =
"Product-Reference"
GridViewTextBoxColumn6.MaxLength = 50
GridViewTextBoxColumn6.Name =
"ProductSetProduct_ProductReference"
GridViewTextBoxColumn7.FieldName =
"ProductSetProduct_ProductName"
GridViewTextBoxColumn7.HeaderText =
"Product-Naam"
GridViewTextBoxColumn7.MaxLength = 255
GridViewTextBoxColumn7.Name =
"ProductSetProduct_ProductName"
Me
.GridViewTemplate1.Columns.AddRange(
New
Telerik.WinControls.UI.GridViewDataColumn() {GridViewTextBoxColumn4, GridViewTextBoxColumn5, GridViewTextBoxColumn6, GridViewTextBoxColumn7})
Me
.GridViewTemplate1.EnableFiltering =
True
Me
.GridViewTemplate1.EnableGrouping =
False
'
'SetsForm
'
Me
.AutoScaleDimensions =
New
System.Drawing.SizeF(6.0!, 13.0!)
Me
.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
Me
.ClientSize =
New
System.Drawing.Size(668, 385)
Me
.Controls.Add(
Me
.RadGridView1)
Me
.FormBorderStyle = System.Windows.Forms.FormBorderStyle.SizableToolWindow
Me
.Name =
"SetsForm"
'
'
'
Me
.RootElement.ApplyShapeToControl =
True
Me
.Text =
"Sets"
CType
(
Me
.RadGridView1.MasterTemplate, System.ComponentModel.ISupportInitialize).EndInit()
CType
(
Me
.RadGridView1, System.ComponentModel.ISupportInitialize).EndInit()
CType
(
Me
.GridViewTemplate1, System.ComponentModel.ISupportInitialize).EndInit()
CType
(
Me
, System.ComponentModel.ISupportInitialize).EndInit()
Me
.ResumeLayout(
False
)
End
Sub
Friend
WithEvents
RadGridView1
As
Telerik.WinControls.UI.RadGridView
Friend
WithEvents
GridViewTemplate1
As
Telerik.WinControls.UI.GridViewTemplate
End
Class
Any ideas as to why this is happening? I use version 2013.1.321.40 of the telerik components
Thanks in advance,
Jasper
EDIT: Of course, I should state as to what's wrong of course...
I expected the columns of the second level to be
- ID
- Product-Reference
- Product-Naam
And the last column just 'not be there'