Home Forums WinForms controls Xceed Grid for WinForms DetailGrid Reply To: DetailGrid

User (Old forums)
Member
Post count: 23064

It is possible if the ElementType.PropertyX also implements the IBindinglist interface.

A sample on implementing this interface is available in the grid’s DataBinding sample. The class ComposersBindingListComplete.cs is a good example.

C:\Program Files\Xceed Components\Xceed Grid for .NET 2.5\Samples\CSharp\DataBinding

For the DetailGrid, you would set your databinding as follows:

private MyList m_list;

//………………

gridControl1.BeginInit();

gridControl1.SetDataBindings( m_list, string.Empty );

DetailGrid dgridTemplate = new DetailGrid();

// PropertyX is the public property name of MyList class exposing another IBindingList
dgridTemplate.SetDataBindings( null, “PropertyX” );

gridControl1.DetailGridTemplates.Add( dgridTemplate );

gridControl1.UpdateDetailGrids();

gridControl1.EndInit();

Imported from legacy forums. Posted by André (had 3010 views)