DataRowView m_dgrvCurrent;
m_dgrvCurrent = (DataRowView) (radGridViewCountries.DataSource as BindingSource).Current;
this
.RichTextBox1.RichTextBoxElement.BackColor = System.Drawing.Color.Gray;
var relation = new GridViewRelation(_StockGridView.MasterTemplate);
relation.ChildTemplate = _PartsTemplate;
relation.RelationName = "PartToArticleCode";
relation.ParentColumnNames.Add("ID");
relation.ChildColumnNames.Add("ArticleCodeID");
this._StockGridView.Relations.Add(relation);
Unfortunatly... this does not work (anymore!). It worked the first time I created the form etc., but after I've added a control to a container to the form (not to the grid), the gridview refuses to show the hierarchy anymore.
Private Sub AddResources()
Try
Dim names As String() = New String() {"Alan Smith", "Anne Dodsworth", "Boyan Mastoni", "Richard Duncan", "Maria Shnaider"}
Dim colors As Color() = New Color() {Color.LightBlue, Color.LightGreen, Color.LightYellow, Color.Red, Color.Orange, Color.Pink, _
Color.Purple, Color.Peru, Color.PowderBlue}
Dim i As Integer = 0
For Each Name As String In names
Dim oResource As New Telerik.WinControls.UI.Resource
oResource.Id =
New Telerik.WinControls.UI.EventId(i)
oResource.Name = Name
oResource.Color = colors(i)
oResource.Visible =
True
oResource.Image =
Me.ilstIcons.Images(0)
RadScheduler1.Resources.Add(oResource)
System.Math.Max(System.Threading.Interlocked.Increment(i), i - 1)
oResource =
Nothing
Next
RadScheduler1.GetDayView().ResourcesPerView = 2
Catch ex As Exception
MessageBox.Show(ex.ToString())
Finally
End Try
End Sub
Thanks,