or
(RadGridReport rep = new RadGridReport(strFileName);
rep.ReportFormShow(
this, this.radGridView1);
both of them are exporting only MasterTable Data. child Table data is not exported.
Please suggest any solution.
Thank you,
Raja.
using
System;
using
System.Collections.Generic;
using
System.Windows.Forms;
using
Telerik.WinControls.UI;
namespace
TestForm
{
public
partial
class
Form1 : Form
{
private
readonly
List<Person> _personen =
new
List<Person>();
public
Form1()
{
InitializeComponent();
_personen.AddRange(
new
[]
{
new
Person {Vorname =
"Danny"
, Nachname =
"Meier"
, Jobs =
new
List<Job>
{
new
Job {Firma =
"Heiniger & Partner AG"
, Ort =
"Wetzikon"
},
new
Job {Firma =
"Scor AG"
, Ort =
"Zürich"
},
new
Job {Firma =
"ERNI Consulting AG"
, Ort =
"Zürich"
}
}},
new
Person {Vorname =
"Michael"
, Nachname =
"Bolliger"
, Jobs =
new
List<Job>()},
new
Person {Vorname =
"Daniel"
, Nachname =
"Kuster"
, Jobs =
new
List<Job>
{
new
Job {Firma =
"Heiniger & Partner AG"
, Ort =
"Wetzikon"
}
}}
});
}
private
void
Form1Load(
object
sender, EventArgs e)
{
radGridView1.AutoGenerateHierarchy =
false
;
var relation =
new
GridViewRelation(radGridView1.MasterTemplate, childTemplate);
relation.ChildColumnNames.Add(
"Job"
);
radGridView1.Relations.Add(relation);
radGridView1.DataSource = _personen;
}
}
public
class
Person
{
public
string
Vorname {
get
;
set
; }
public
string
Nachname {
get
;
set
; }
public
List<Job> Jobs {
get
;
set
; }
}
public
class
Job
{
public
string
Firma {
get
;
set
; }
public
string
Ort {
get
;
set
; }
}
}
GridViewMultiComboBoxColumn col =
new
GridViewMultiComboBoxColumn();
col.DataSource = mh.ToList();
col.DisplayMember =
"ProductName"
;
col.ValueMember =
"ProductId"
;
col.FieldName =
"ProductId";
col.HeaderText =
"Product Name"
;
col.DropDownStyle = Telerik.WinControls.RadDropDownStyle.DropDown;
col.AutoCompleteMode = AutoCompleteMode.SuggestAppend;
FilterDescriptor descriptor =
new
FilterDescriptor(col.DisplayMember, FilterOperator.StartsWith,
string
.Empty);
col.FilterDescriptor = descriptor;