Hi,
I'm using a combobox in the ReportControl V16.2.3. When I select a value from the combobox, the value is changed, but the caption does not.
I'm using the following code to populate the combox:
var column = rcBerichten.Columns.Find(1); //value of the column index column.EditOptions.Constraints.DeleteAll();
column.EditOptions.AllowEdit = false;
column.EditOptions.ConstraintEdit = true;
column.EditOptions.Constraints.Add("(Dossier map)", SelectedDossier.DossierNummer);
foreach (var fldr in Collections.Collections.ListDossierFolder.Where (d=>d.DossierNummer == SelectedDossier.DossierNummer && d.ParentFolder == SelectedDossier.DossierNummer.ToString()))
{
column.EditOptions.Constraints.Add(fldr.FolderName, fldr.FolderId);
}
foreach (ReportRecord rec in rcBerichten.Records)
{
if (string.IsNullOrEmpty(Instellingen.Instance.EmailMap))
{
rec[1].Caption = "(Dossier map)";
rec[1].Value = SelectedDossier.DossierNummer;
}
else
{
var folder = Collections.Collections.ListDossierFolder.FirstOrDefault (d => d.FolderName == Instellingen.Instance.EmailMap && d.DossierNummer == SelectedDossier.DossierNummer);
if (folder != null)
{
rec[1].Caption = folder.FolderName;
rec[1].Value = folder.FolderId;
}
else
{
rec[1].Caption = Instellingen.Instance.EmailMap;
rec[1].Value = -1;
}
}
foreach (ReportRecord chd in rec.Childs)
{
if (string.IsNullOrEmpty(Instellingen.Instance.EmailMap))
{
chd[1].Caption = "(Dossier map)";
chd[1].Value = SelectedDossier.DossierNummer;
}
else
{
var fldr = Collections.Collections.ListDossierFolder.FirstOrDefault (d => d.FolderName == Instellingen.Instance.EmailMap && d.DossierNummer == SelectedDossier.DossierNummer);
if (fldr != null)
{
rec[1].Caption = fldr.FolderName;
rec[1].Value = fldr.FolderId;
}
else
{
rec[1].Caption = Instellingen.Instance.EmailMap;
rec[1].Value = -1;
}
}
}
}
What am I missing/doing wrong? Thanks in advance, Best regards, Jouke van Rossum
|