North American Sales: 1-800-231-8588
Global Contacts
My Account
Menu
North American Sales: 1-800-321-8588
My Account
Sign In/Register
Design & Development
Design & Develop
Best Value
Infragistics Ultimate
The complete toolkit for building high performing web, mobile and desktop apps.
Indigo.Design
Use a unified platform for visual design, UX prototyping, code generation and application development.
Web
Ignite UI for Angular
Ignite UI for JavaScript
Ignite UI for React
Ultimate UI for ASP.NET
Indigo.Design
Desktop
Ultimate UI for Windows Forms
Ultimate UI for WPF
Prototyping
Indigo.Design
Mobile
Ultimate UI for Xamarin
Ultimate UI for iOS
Ultimate UI for Android
Automated Testing Tools
Test Automation for Micro Focus UFT: Windows Forms
Test Automation for Micro Focus UFT: WPF
Test Automation for IBM RFT: Windows Forms
UX
Indigo.Design Desktop
Collaborative prototyping and remote usability testing for UX & usability professionals
Indigo.Design
A Unified Platform for Visual Design, UX Prototyping, Code Generation, and App Development
Business Intelligence
Reveal Embedded
Accelerate your time to market with powerful, beautiful dashboards into your apps
Reveal App
Empower everyone in your organization to use data to make smarter business decisions
Team Productivity
Learn & Support
Support
Help & Support Documents
Blogs
Forums
Product Ideas
Reference Applications
Customer Stories
Webinars
eBook & Whitepapers
Events
Free Trials
Pricing
Product Pricing / Buy Online
Renew Existing License
Contact Us
Forums
Ultimate UI for WPF
Your Privacy Matters
: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use.
Cookie Policy
Close
State
Not Answered
Replies
0 replies
Subscribers
5 subscribers
Views
186726 views
Users
0 members are here
Heirarchical binding
XamDataGrid
Share
More
Cancel
240
how to bind?
Gwang Hyun
posted
over 16 years ago
I tried to bind custom data to XamDatagrid.
My custom data class is follows.
[DataContract]
public class AccessAreaDataByGroup : INotifyPropertyChanged
{
#region Ctor
public AccessAreaDataByGroup(int groupNo, string name)
{
this.groupNo = groupNo;
this.name = name;
this.accdataByRcu = new ObservableCollection<AccessAreaDataByRcu>();
}
#endregion
#region Fields
private int groupNo;
private string name;
private ObservableCollection<AccessAreaDataByRcu> accdataByRcu = null;
#endregion
#region Properties
public int GroupNo
{
get { return this.groupNo; }
set { this.groupNo = value; }
}
public string Name
{
get { return this.name; }
set { this.name = value; }
}
public ObservableCollection<AccessAreaDataByRcu> AccessDataByRcu
{
get { return this.accdataByRcu; }
set { this.accdataByRcu = value; }
}
#endregion
#region Methods
#endregion
#region Events
public event PropertyChangedEventHandler PropertyChanged;
private void NotifyPropertyChanged(String info)
{
PropertyChangedEventHandler hander = PropertyChanged;
if (hander != null)
{
PropertyChanged(this, new PropertyChangedEventArgs(info));
}
}
#endregion
#region Event Handelr
#endregion
}
[DataContract]
public class AccessAreaDataByRcu : INotifyPropertyChanged
{
#region Ctor
public AccessAreaDataByRcu(int groupNo, int rcuNo)
{
this.groupNo = groupNo;
this.rcuNo = rcuNo;
this.accdataByDoor = new ObservableCollection<AccessAreaDataByDoor>();
}
#endregion
#region Fields
private int groupNo;
private int rcuNo;
private ObservableCollection<AccessAreaDataByDoor> accdataByDoor = null;
#endregion
#region Properties
public int GroupNo
{
get { return this.groupNo; }
set { this.groupNo = value; }
}
public int RcuNo
{
get { return this.rcuNo; }
set { this.rcuNo = value; }
}
public ObservableCollection<AccessAreaDataByDoor> AccessDataByDoor
{
get { return this.accdataByDoor; }
set { this.accdataByDoor = value; }
}
#endregion
#region Methods
#endregion
#region Events
public event PropertyChangedEventHandler PropertyChanged;
private void NotifyPropertyChanged(String info)
{
PropertyChangedEventHandler hander = PropertyChanged;
if (hander != null)
{
PropertyChanged(this, new PropertyChangedEventArgs(info));
}
}
#endregion
#region Event Handelr
#endregion
}
[DataContract]
public class AccessAreaDataByDoor : INotifyPropertyChanged
{
#region Ctor
public AccessAreaDataByDoor(int rcuNo, int doorNo)
{
this.rcuNo = rcuNo;
this.doorNo = doorNo;
}
#endregion
#region Fields
private int rcuNo;
private int doorNo;
private bool accessabled = false;
#endregion
#region Properties
public int RcuNo
{
get { return this.rcuNo; }
set { this.rcuNo = value; }
}
public int DoorNo
{
get { return this.doorNo; }
set { this.doorNo = value; }
}
public bool Accessabled
{
get { return this.accessabled; }
set { this.accessabled = value; }
}
#endregion
#region Methods
#endregion
#region Events
public event PropertyChangedEventHandler PropertyChanged;
private void NotifyPropertyChanged(String info)
{
PropertyChangedEventHandler hander = PropertyChanged;
if (hander != null)
{
PropertyChanged(this, new PropertyChangedEventArgs(info));
}
}
#endregion
#region Event Handelr
#endregion
}
I want to bind AccessAreaDataByGroup collections to XamDataGrid.
The AccessAreaDataByGroup has AccessAreaDataByRcu collection, and the AccessAreaDataByRcu has AccessAreaDataByDoor collection.
My problem is I don't want Heirarchical bind AccessAreaDataByRcu collection and AccessAreaDataByDoor collection.
I want to bind like belows.
Rcu1 Rcu2 Rcu3 Rcu4 Rcu5
Group Name door1 door2 doo1 door2 door1 door2 door1 door2 door1 door2
1 test1 true false true false true false true false true false
2 test2 true false true false true false true false true false
3 test3 true false true false true false true false true false
4 test4 true false true false true false true false true false
5 test5 true false true false true false true false true false
6 test6 true false true false true false true false true false
7 test7 true false true false true false true false true false
how to code in XAML??