| Dim sfd As New SaveFileDialog |
| Dim exporter As ExportToExcelML = New ExportToExcelML(Me.gv_urzadzenia) |
| sfd.DefaultExt = ".xls" |
| sfd.Filter = "Excel files (*.xls)|*.xls|All files (*.*)|*.*" |
| If sfd.ShowDialog() = System.Windows.Forms.DialogResult.OK Then |
| Try |
| exporter.SheetName = "urzadzenia" |
| exporter.SheetMaxRows = ExcelMaxRows._1048576 |
| exporter.ExportVisualSettings = True |
| exporter.RunExport(sfd.FileName) |
| MsgBox(lng.zwroc_napis_z_nazwy_elementu("usr_planowanie_zostalo_poprawnie_wyeksportowane"), MsgBoxStyle.Information, lng.zwroc_napis_z_nazwy_elementu("okno")) |
| Catch ex As Exception |
| MsgBox(lng.zwroc_napis_z_nazwy_elementu("usr_planowanie_niezostalo_wyeksportowane"), MsgBoxStyle.Critical, lng.zwroc_napis_z_nazwy_elementu("okno")) |
| End Try |
| End If |
| RadListBoxItem item = new RadListBoxItem(str); |
| listBox.Items.Add(item); |
I want this ListBox to stay sorted, so I set
| listBox.Sorted = Telerik.WinControls.Enumerations.SortStyle.Ascending; |
DataSet
ds = new DataSet ();
ds.ReadXml(
@"Parent.xml");
DataTable Parent = ds.Tables[0];
ds =
new DataSet();
ds.ReadXml(
@"Child.xml");
DataTable Child = ds.Tables[0];
radGridView1.AutoGenerateHierarchyFromDataSet =
true;
radGridView1.MasterGridViewTemplate.AllowAddNewRow =
true;
radGridView1.MasterGridViewTemplate.DataSource = Parent;
//setup the child template
GridViewTemplate template = new GridViewTemplate();
template.AllowAddNewRow =
true;
template.DataSource = Child;
//create the relation
GridViewRelation relation = new GridViewRelation(radGridView1.MasterGridViewTemplate);
relation.ChildTemplate = template;
relation.RelationName =
"ModuleID";
relation.ParentColumnNames.Add(
"ModuleID");
relation.ChildColumnNames.Add(
"ModuleID");
radGridView1.Relations.Add(relation);
// Adding child template to Main Grid
radGridView1.MasterGridViewTemplate.ChildGridViewTemplates.Add(template);
radGridView1.AutoGenerateHierarchyFromDataSet =
true;
Sample Data in Parent Table.
----------------------------------------
<
Table>
<ModuleID>1</ModuleID>
<
ModuleName>Organisation</ModuleName>
<
ArbModuleName>arbOrganisation</ArbModuleName>
</
Table>
Sample Data in child Table
----------------------------------
<
Table>
<
ModuleID>1</ModuleID>
<
FormID>2</FormID>
<
FormName>frmCountry</FormName>
<
FormDescription>Country Details</FormDescription>
<
FormArbDescription>Arb Country Details</FormArbDescription>
</
Table>
The grid is displaying only the parent table data.
I didnt changed any property of the grid except in the above code
please give me a solution.
Thanking you
Sabindas K S