Hello,
I have one problem that makes me crazy. Can anyone help?
Problem:
I have a tree structure that I wanted to bind to RadGridView, something like this:
public interface IGridViewZadanka
{
Odbornost Odbornost { get; }
int IDZad { get; }
string ZadankaInfo { get; }
IEnumerable<IGridViewMetoda> MetodyView { get; }
}
public interface IGridViewMetoda
{
string Test { get; }
string Izolace { get; }
string Postup { get; }
string P { get; }
string Zadani { get; }
string Odecet { get; }
string Vysledek { get; }
string Stav { get; }
bool Tisk { get; }
string V { get; }
string Popisek { get; }
int IDZad { get; }
int IDZadMet { get; }
int? IDParent { get; }
Odbornost Odbornost { get; }
}
I want to bind this structure to two-level hierarchy grid with one feature: second level will contain 2 (or more in future) tables that depend on field Odbornost (detail table for Odbornost are slightly different – for Odbornost MB would be nice to use self-referenced hierarchy, but for Odbornost TS would be nice to use only flat view of data) and only one corresponding detail will be visible.
For example:
+ (IGridViewZadanka) IDZad=1, Odbornost=TS,…
- (IGridViewMetoda) IDZad=1, Odbornost=TS,…
- (IGridViewMetoda) IDZad=1, Odbornost=TS,…
+ (IGridViewZadanka) IDZad=1, Odbornost=MB,…
+ (IGridViewMetoda) IDZad=1, Odbornost=MB,…
- (IGridViewMetoda) IDZad=1, Odbornost=MB,…
+ (IGridViewZadanka) IDZad=2, Odbornost=TS,…
- (IGridViewMetoda) IDZad=2, Odbornost=TS,…
- (IGridViewMetoda) IDZad=2, Odbornost=TS,…
From examples in http://mono.telerik.com/Grid/Examples/Hierarchy/TwoTablesAtLevel/DefaultCS.aspx and http://www.telerik.com/help/aspnet-ajax/grid-several-tables-at-level.html and http://demos.telerik.com/aspnet-ajax/grid/examples/hierarchy/twotablesatlevel/defaultcs.aspx I know that this is possible, but I am unable to do it. Can anyone help me and provide me some example (in C# for win form)? I would appreciate it.
Misa