public class ListViewItemButton : SimpleListViewVisualItem { private RadButtonElement buttonElement; private LightVisualElement contentElement; private StackLayoutPanel stackLayout; protected override void CreateChildElements() { base.CreateChildElements(); this.stackLayout = new StackLayoutPanel(); this.stackLayout.Orientation = Orientation.Horizontal; this.stackLayout.EqualChildrenWidth = true; this.contentElement = new LightVisualElement(); this.contentElement.StretchHorizontally = true; this.contentElement.MinSize = new Size(60, 0); this.stackLayout.Children.Add(this.contentElement); this.buttonElement = new RadButtonElement(); this.buttonElement.Text = "Remove "; this.stackLayout.Children.Add(this.buttonElement); this.Children.Add(this.stackLayout); } protected override void SynchronizeProperties() { base.SynchronizeProperties(); this.Text = ""; this.buttonElement.Text = "Remove "; } protected override Type ThemeEffectiveType { get { return typeof(SimpleListViewVisualItem); } } }}private void HandleRadListViewVisualItemCreating(object sender, ListViewVisualItemCreatingEventArgs e) { e.VisualItem = new ListViewItemButton(); }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,
