Hello,
We try to update our software. Actually, we use VS2008 (Framework 3.5) and WinForm Infragistics 8.3. We want to update the version to VS2010 (Framework 4.0) and Winform Infragistics 11.1.
After the update, with some modifications, we launched the software, without problems.
After some tests, We saw that our UltraGrid have a lot of Bands. Into the version 8.3, we have only 1 band, with the version 11.1, we have sometimes 2/3/4... bands.
We saw that added bands, correspond to the different links in the database.
For exemple :
bindingSource1.DataSource = Globals.Contexte.REGION;
--> Where REGION is a table in the database.
--> REGION is link to REGION_CP (1 REGION must have many REGION_CP) and REGION_DEPARTEMENT (1 REGION must have many REGION_DEPARTEMENT)
--> In version 8.3, we have only 1 band. In, this band, we have columns REGION_CP and REGION_DEPARTEMENT
--> In version 11.1, we have 3 bands (REGION, REGION_CP and REGION_DEPARTEMENT)
Are there settings or other thing to use, to have the same result in version 8.3 and 11.1 ?
Thanks for your help !
Hello Vincent,
If I understand well your issue, maybe you could try to set property: ultraGrid1.DisplayLayout.MaxBandDepth = 1;
Let me know if you have any questions.
Regards
I try to put this property, but it's the same problem. I have, again, many bands.
I try to put "Hidden" on band's property, without success.
Is it possible that the operation has changed between the two versions ?
I don't have columns named [REGION_CP] or [REGION_DEPARTEMENT] in my first (and only) band.
I have 3 bands (REGION, REGION_CP and REGION_DEPARTEMENT), and on the first band, I don't have columns ([REGION_CP] or [REGION_DEPARTEMENT])
LEBARD vincent said:I try to put this property, but it's the same problem. I have, again, many bands.
It is difficult to guess the reasons for this behavior. I suppose that something override this settings. Maybe something into your code. Are you using Save/Load layouts methods ? Are you able to send us small sample with this issue ? I`ll be glad to research it for you.
This is the code of my form :
using System;using System.Collections.Generic;using System.ComponentModel;using System.Data;using System.Drawing;using System.Linq;using System.Text;using System.Windows.Forms;using Librairie;using LibrairieControles;using Infragistics.Win.UltraWinGrid;using Pegasus.IHM.ComboboxControler;using Infragistics.Win;namespace Sav{ public partial class Form_Param_Region : FormBase { private string Action; private REGION selectedRegion; #region Appel du formulaire private static REGION Run(IWin32Window wnd, string action) { var formulaire = new Form_Param_Region (action); try { formulaire.ShowDialog (wnd); return formulaire.selectedRegion; } catch (Exception ex) { formulaire.ExceptionShow (ex); return null; } finally { formulaire.Dispose (); } } public static void editRegion (IWin32Window wnd) { Run(wnd, "edit"); } public static REGION consultRegion (IWin32Window wnd) { return Run(wnd, "consult"); } #endregion #region GridHeader private class GridHeaders { public const string IdRegion = "IdRegion"; public const string TYPE_REGION = "TYPE_REGION"; public const string LibelleRegion = "LibelleRegion"; } #endregion public Form_Param_Region (string action) { Action = action; InitializeComponent (); if (Action == "edit") { ultraGrid1.SetColumnHeader (new Dictionary<String, String> () { { GridHeaders.IdRegion, Pegasus.IHM.Resources.GridHeaders.IDS_GridHeader_Code}, { GridHeaders.TYPE_REGION, Pegasus.IHM.Resources.GridHeaders.IDS_GridHeader_Type}, { GridHeaders.LibelleRegion, Pegasus.IHM.Resources.GridHeaders.IDS_GridHeader_Libelle}, }); ultraGrid1.DisplayLayout.Bands[0].Columns[GridHeaders.IdRegion].CellActivation = Activation.Disabled; ControleurTYPE_REGION.AddValueList2ultraGrid (ultraGrid1); } else { ultraGrid1.SetColumnHeader (new Dictionary<String, String> () { { GridHeaders.TYPE_REGION, Pegasus.IHM.Resources.GridHeaders.IDS_GridHeader_Type}, { GridHeaders.LibelleRegion, Pegasus.IHM.Resources.GridHeaders.IDS_GridHeader_Libelle}, }); ultraGrid1.DisplayLayout.Override.AllowUpdate = DefaultableBoolean.False; ControleurTYPE_REGION.AddValueList2ultraGrid (ultraGrid1); } bindingSource1.DataSource = Globals.pegasusContexte.REGION; } private void okButton_Click (object sender, EventArgs e) { Valider(); } private void ultraGrid1_DoubleClickRow(object sender, DoubleClickRowEventArgs e) { Valider(); DialogResult = DialogResult.OK; } private void ultraGrid1_BeforeRowsDeleted (object sender, BeforeRowsDeletedEventArgs e) { e.DisplayPromptMsg = false; if (Action == "edit") { e.DisplayPromptMsg = false; REGION region = ultraGrid1.ActiveRow.ListObject as REGION; if (region.IsUsed (Pegasus.BL.Globals.Globals.UserConnect.Serveur, Pegasus.BL.Globals.Globals.UserConnect.Instance, Pegasus.BL.Globals.Globals.UserConnect.TypeBase)) { this.Information (Properties.Resources.IDS_Param_SuppressionRegionImpossible); e.Cancel = true; } else { if (!this.Confirmation (Properties.Resources.IDS_Param_ConfirmationSuppressionRegion)) { e.Cancel = true; } } } else e.Cancel = true; } private void Valider() { if (Action == "edit") { Globals.pegasusContexte.SaveChanges (); } else { selectedRegion = ultraGrid1.ActiveRow.ListObject as REGION; } } }}
I try to put your proposal after : bindingSource1.DataSource = Globals.pegasusContexte.REGION; ... without success
When I see data in the UltraWinGrid Designer, in Control Settings, I select "Modified Only", I see DisplayLayout :
I check :
- DataSource : bindingSource1
- AutoFitStyle : ExtendLastColumn
- Bands : 0 - REGION
1 - REGION_CP
2 - REGION_DEPARTEMENT
This form is a parameter form. I need to update, delete or create row in this Grid.
If I hide bands 1 and 2, when I create row in band 0, when I save data, I have an error message. I think, the software try to save other data (REGION_CP and REGION_DEPARTEMENT), without success...
Thanks a lot for your help
Best Regards
Thanks for attached code, but I was not able to find the reasons. If you are able please upload whole sample that I could build and run at my machine. I`d like to debug it. If you think that it is not possible, then my suggestion is to arrange a live session. By this way I`ll take a look and debug this issue at your machine. I`m available from Monday till Friday between 06:00 - 14:00 UTC.
Please let me know if you have any questions.
I create a private case for you with Ref number CAS-105569-M7T7W0. You could find it at https://ko.infragistics.com/my-account/support-activity/
Please write us through this case. Also you could upload your smaple there. Let me know if you have any questions
Excuse me, for my late,
We try, actually, to use Infragistics 8.3 for VS2010 (FrameWork 4). That's why, I didn't answer.
But we have some trouble with UltraButton (Properties Image). We have a message : "Code generation for property 'Image' failed". We find that it is a bug in old versions (do you know this problem ?)
We will try to find solution with the 11.1 version. One person of our team, will try to find what the problem is. I ask him to contact you for more information.
How could we send you a sample ? I think we will try to send you more information about this.
Thanks a lot