Print Page | Close Window

ComboBox Caption not updated when selection change

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Report Control
Forum Description: Topics Related to Codejock Report Control
URL: http://forum.codejock.com/forum_posts.asp?TID=22819
Printed Date: 21 November 2024 at 11:14am
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: ComboBox Caption not updated when selection change
Posted By: JoukevRossum
Subject: ComboBox Caption not updated when selection change
Date Posted: 14 December 2015 at 3:52am
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



Replies:
Posted By: olebed
Date Posted: 14 December 2015 at 11:01am
Hello Jouke van Rossum,

This bug with ComboBox AllowEdit and ConstraintEdit conflict was fixed for version 16.4 (svn revision 16502) . Try to using our new Release Candidate of v17.0.

Regards,
 Oleksandr Lebed 


Posted By: JoukevRossum
Date Posted: 14 December 2015 at 11:14am
Hi Oleksandr Lebed,

Thank you for your response!

I will look into it. 

I found a quick'n'dirty fix for now :)

Regards,

Jouke van Rossum


-------------
Product: Xtreme SuitePro (ActiveX) version 16.2.3
Platform: Windows 8.1 (x64)
Language: Visual Studio 2012 ActiveX C#



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.04 - http://www.webwizforums.com
Copyright ©2001-2021 Web Wiz Ltd. - https://www.webwiz.net