We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy.
Unfortunately, activation email could not send to your email. Please try again.

ComboBox-cells give problems after upgrade version 3.2.1.0

Thread ID:

Created:

Updated:

Platform:

Replies:

30432 Jun 17,2005 09:31 AM Jun 20,2005 10:46 AM Windows Forms 8
loading
Tags: GridControl
Administrator [Syncfusion]
Asked On June 17, 2005 09:31 AM

Hello, My ComboBox-cells give problems in my Grid after upgrading from version 2.1.0.9 to version 3.2.1.0 I have 2 problems with my ComboBox cells in a grid after the upgrade: 1 The value a cell shows is not anymore what I expected but the formname + ValueMemberName. The font that''s used is also a little bit strange (shaded ?). 2 clicking on a cell doesn''t show the list of possible values This is the code I use for defining the cell: GridControl[1,1].CellType = "ComboBox"; GridControl[1,1].DropDownStyle = GridDropDownStyle.Exclusive; GridControl[1,1].Trimming = System.Drawing.StringTrimming.EllipsisCharacter; GridControl[1,1].DataSource = lDataSource; GridControl[1,1].DisplayMember = "Contract"; GridControl[1,1].ValueMember = "ContractItem"; The property Contract of a ContractItem returns a string; lDataSource is an ArrayList of ContractItem-objects Can someone tell me what I do wrong ? With regards, Eric van Dinter

Administrator [Syncfusion]
Replied On June 17, 2005 11:12 AM

I suspect there may be a exception being thrown. Just your output window when you run in debug. Are you setting the initial values in cell 1,1 to be valid ContractItem values, (ie, have the same type). For example, if ContractItem is an integer, then are you setting grid[1,1].Cellvalue to an iteger (maybe grid[1,1].CellValueType = typeof(int) ).

Administrator [Syncfusion]
Replied On June 20, 2005 06:06 AM

Hello Clay, I don''t get the impression that an exception occurred. How can I be sure of it ? I set the value of the cell with the following code: foreach(ContractItem lItem in lDataSource) { if (lItem.Contract == lContract) { GridControl[1,1].CellValue = lItem; break; } } When I add the code: GridControl[1,1].CellValueType = typeof(ContractItem); I still get the same result

Administrator [Syncfusion]
Replied On June 20, 2005 06:20 AM

You can run your application in debug mode with the debugger set to break on exceptions. (Use the Debug/Exceptions menu item. In the dialog, click Common Language Runtime exceptions in the top box, and then click the Break into the Debugger option underneath it.) Is the Contract value a string, or is it an object you have defined through a class. If if is an object, did you override ToString to display what you want seen here? If you can upload a sample project showingthe porblem, we can try to debug it here.

Administrator [Syncfusion]
Replied On June 20, 2005 08:58 AM

Hi Clay, I added the ToString method and now the right text is shown. I thought that it would be set by DisplayMember ? But I still have the problem that font is strange and clicking does not have any effect. So hereby I send you a little project showing the problem. Eric

Administrator [Syncfusion]
Replied On June 20, 2005 08:59 AM

Here''s the project

Administrator [Syncfusion]
Replied On June 20, 2005 09:01 AM

TestComboBox_106.zip This time I hope ! ;-)

Administrator [Syncfusion]
Replied On June 20, 2005 10:18 AM

Try setting the ValueMember to null. gridControl1[1,1].ValueMember = null; This will tell the gri dthat you want to use the item itself as teh value (and not a property of teh item).

Administrator [Syncfusion]
Replied On June 20, 2005 10:46 AM

Yep ! That does the trick. Thanx for your support !! Eric

CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.

;