Hi. I am evaluating your product. Everytime I try to add a datasoucre to your grid (using the property windows of VS and selecting a class in another project) visual studio stops responding. Is this a known issue ?
Is there a fix for this ?
Thanks
Yes I tried MaxBandDepth (setting it to 5 and it worked) now I have another problem VS2008 IDE keeps crashing evrytime I try to open the form with the ultragrid on it.
As for setting the datasource of the grid I use the property windows - > Datasource -> Add project datasource -> Select the PartyType class
Right now I am thinking of going back to vs2005.. Is the crashing issue Infragistics related or its just that VS2008 is buggy ?
Thanks for the help. Any sample showing how to create a bindingsource wrapper ? In the ideal scenario I would like to select witch properties of my object would be bound to the grid. For example, partyType inherit from LiquidBO but I don't want the properties of the base object to be bound to the grid (even if they can be hidden).
For now the crashing is the main problem...
This does not appear to be recursive, unless maybe PartyType is an object list that references a list of more PartyTypes.
How exactly are setting the grid's DataSource? I'm not sure what you mean by
mthgrondin said:selecting a class in another project
You may need to create a BindingSource to wrap your object for binding.
Did you try setting MaxBandDepth?
Its a business object... Here is the Class.
Do you see the problem ? Thanks for the quick response.
using System;using System.ComponentModel;using DevID.Framework.Core.Data.LiquidProvider;using GVG.Framework.Interface;using Infragistics.Win;using PropertyChangedEventArgs=System.ComponentModel.PropertyChangedEventArgs;using PropertyChangedEventHandler=System.ComponentModel.PropertyChangedEventHandler;namespace GVG.HyperDrive.BusinessLogic.DataObject{ public class Personne : LiquidBO, INotifyPropertyChanged, ILiquidBO { public static Personne Personne1 = new Personne { Nom = "Mathieu", ID = "M", PersonnePartyType = PartyType.CompagniePartyType }; public static Personne Personne2 = new Personne { ID = "E", Nom = "Eli", PersonnePartyType = PartyType.PersonnePartyType }; public static Personne Personne3 = new Personne { ID = "PL", Nom = "Pierre-Luc", PersonnePartyType = PartyType.CompagniePartyType }; private Guid _personneUID; private string _id; private string _nom; private PartyType _partyType; public event PropertyChangedEventHandler PropertyChanged; public string Nom { get { return _nom; } set { if (value != _nom) { _nom = value; NotifyPropertyChanged("Nom"); } } } public PartyType PersonnePartyType { get { return _partyType; } set { if(value != _partyType) { _partyType = value; NotifyPropertyChanged("PersonnePartyType"); } } } //[DescriptionAttribute(@""), Bindable(BindableSupport.Yes)] //[DataObjectField(false, true, true)] //public string UnitName //{ // get { return _partyType.ID; } // //set // //{ // // if (value != _partyType.ID) // // { // // _partyType.ID = value; // // NotifyPropertyChanged("UnitName"); // // } // //} //} public string ID { get { return _id; } set { if (value != _id) { _id = value; NotifyPropertyChanged("ID"); } } } private void NotifyPropertyChanged(String info) { if (PropertyChanged != null) { PropertyChanged(this, new PropertyChangedEventArgs(info)); } } public Guid UID { get { return _personneUID; } set { if (value != _personneUID) { _personneUID = value; NotifyPropertyChanged("UID"); } } } public string DisplayValue {// todo Faudrait caller DisplayValue changed si une des propriétés composant DisplayValue change... get { return _id + " : " + _nom + " (" + _partyType.Description + ")"; } } public string TypeAbreviationValue { get { return "Prsnn"; } } public void Create() { Create(this); } public void Delete() { Delete(this); } public void Update() { Update(this); } public void Load() { //using (IDbConnection conn = new SqlConnection(Constant.DatabaseConnectionString)) //{ // LiquidHelper.Load(this, typeof(Personne), this, conn); //} } public static void Save(Personne personne) { //using (IDbConnection conn = new SqlConnection(Constant.DatabaseConnectionString)) //{ // if (personne.UID == Guid.Empty) // { // LiquidHelper.Create(personne, typeof(Personne), conn); // } // else // { // LiquidHelper.Update(personne, typeof(Personne), conn); // } //} } public static void Create(Personne personne) { //using (IDbConnection conn = new SqlConnection(Constant.DatabaseConnectionString)) //{ // LiquidHelper.Create(personne, typeof(Personne), conn); //} } public static void Update(Personne personne) { //using (IDbConnection conn = new SqlConnection(Constant.DatabaseConnectionString)) //{ // LiquidHelper.Update(personne, typeof(Personne), conn); //} } public static void Delete(Personne personne) { //using (IDbConnection conn = new SqlConnection(Constant.DatabaseConnectionString)) //{ // LiquidHelper.Delete(personne, typeof(Personne), conn); //} } public static LiquidGenericCollection<Personne> List(Personne personne) { Personne filtre = personne; LiquidGenericCollection<Personne> personnes = new LiquidGenericCollection<Personne>(); personnes.Add(Personne1); personnes.Add(Personne2); personnes.Add(Personne3); return personnes; } public LiquidCollectionBase List() { LiquidGenericCollection <Personne> personnes = new LiquidGenericCollection<Personne>(); return personnes; } public override void InitializeChilds() { _partyType = new PartyType(); } public static ValueList GetValueList() { ValueList myList = new ValueList(); myList.ValueListItems.Add(Personne1); myList.ValueListItems.Add(Personne2); myList.ValueListItems.Add(Personne3); return myList; } }}
What's the nature of the data source you're binding to?
It's a shot-in-the-dark, but I suspect that your data source may be self-referential in some way. In other words, if it's a DataSet, it contains a DataTable that relates (directly or indirectly) back to itself. If it's a business object, it contains child lists that (directly or indirectly) have the same datatype. If this is the case, then the grid is trying to figure out how deep the hierarchy goes, until it finds the end of the hierarchy (which is never) or hits its MaxBandDepth. This property is set off the DisplayLayout.MaxBandDepth property, which defaults to 100 - try dropping this to 5 to see if this helps.
If that's not it, then it's not a problem I'm familiar with.