If I set the UltraCombo.CheckedListSettings.CheckStateMember property to "Selected"
designer can not be displayed but error occured.
The error message is "The ValueMember property and CheckStateMember property both reference column 'Selected'. The CheckStateMemver property cannot reference the same column that defines the control's value"
So I removed the CheckStateMember property value. Designer has no prolbem, but UltraCombo does not operate any more.
Please let me know how to solve this problem.
Hello guidegi,
The CheckStateMember property should be set to a different value than the ValueMember property or you will get a System.Exception. I tried this scenario and after I remove the CheckStateMember property value or set it to a different column, I have no problems with the combo functionality.
Could you please send me the sample that is not working and I will take a look at it?
I have not set the ValueMember property, but I get the Exception.
This is my desinger code
this.uc_Type.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Right))); this.uc_Type.CheckedListSettings.CheckStateMember = "Selected"; this.uc_Type.CheckedListSettings.EditorValueSource = Infragistics.Win.EditorWithComboValueSource.CheckedItems; ugColumn_Selected.AutoSizeMode = Infragistics.Win.UltraWinGrid.ColumnAutoSizeMode.AllRowsInBand; ugColumn_Selected.DataType = typeof(bool); ugColumn_Selected.Header.Caption = ""; ugColumn_Selected.Header.CheckBoxVisibility = Infragistics.Win.UltraWinGrid.HeaderCheckBoxVisibility.Always; ugColumn_Selected.Header.VisiblePosition = 0; ugColumn_Selected.Width = 27; ugc_Type.AutoSizeMode = Infragistics.Win.UltraWinGrid.ColumnAutoSizeMode.AllRowsInBand; ugc_Type.Header.Caption = "Type"; ugc_Type.Header.VisiblePosition = 1; ultraGridBand1.Columns.AddRange(new object[] { ugColumn_Selected, ugc_Type}); appearance14.TextHAlignAsString = "Center"; ultraGridBand1.Override.CellAppearance = appearance14; appearance15.TextHAlignAsString = "Center"; ultraGridBand1.Override.HeaderAppearance = appearance15; this.uc_Type.DisplayLayout.BandsSerializer.Add(ultraGridBand1); this.uc_Type.DisplayStyle = Infragistics.Win.EmbeddableElementDisplayStyle.WindowsVista; this.uc_Type.DropDownStyle = Infragistics.Win.UltraWinGrid.UltraComboStyle.DropDownList; this.uc_Type.Location = new System.Drawing.Point(84, 73); this.uc_Type.Name = "uc_Type"; this.uc_Type.PreferredDropDownSize = new System.Drawing.Size(0, 0); this.uc_Type.Size = new System.Drawing.Size(175, 22); this.uc_Type.TabIndex = 24; this.uc_Type.AfterCloseUp += new System.EventHandler(this.uc_Type_AfterCloseUp); this.uc_Type.BeforeDropDown += new System.ComponentModel.CancelEventHandler(this.uc_Type_BeforeDropDown);
Hi guidegi,
Looking at the code everything looks fine. I created a similar sample which is working just perfect. When the ValueMember is not set, the CheckStateMember can be set to any column, containing data type that can be converted to and from the boolean data type and there is no reason for throwing exception. I believe that something else in your application could be causing the exception, but I need a sample to be able to make a further investigation. If you could please send me a small sample catching the Exception, it will be much easier for me to help you.
I removed the code that set CheckStateMember property from designer, and then add that code into Form creator.
In this case, the designer error does not occur any more.
In the case that UlraCombo has the UltraColumn of which key is "Selected", I can not set the CheckStateMember property to "Selected".
This is the reason why desingner error occured.
I am wondering why I can not set the CheckStateMember property in the desinger.
Is this a kind of bug?
I wanted to know if you were able to solve your issue based on these suggestions or you still need help. Please let me know.
Hi,
Attached is a small sample, that is working just fine for me. I am not getting any exceptions, as long as the CheckStateMember is not the same is the ValueMember. You can read more about this from the following topic: http://ko.infragistics.com/help/topic/7D9BD45F-424B-4A04-94D2-BA90836B97B1
Let me know if you have any other questions.