I made a simple boundgrid inside a navigational control attach to an Access database using datasets and dataadapters. I have a column which I used the combobox option. I placed a datasource in it from another table.
The very siple way.
Now, when I start to write inside the combobox, then mouve back with the arrow, then press the DELETE key to remove a character, it delete all the row.
Is there a way to make it delete the characters and not the row when in edit mode?
ADAdministrator Syncfusion Team December 2, 2002 01:29 AM
Maybe I am misuderstanding what you are doing, but I don't see this behavior in the 1.5 version of Essential Grid. Attached is a sample that has a foreign combo in the third column, and if you press delete while actively editing this combo, it deletes a character from the combo's edit box, and not the row.
One comment about foreign key combobox's. Normally, this type of combobox is a dropdownlist so you would not really edit values in it. The reason for this, is that you have 2 values being used, the DisplayMember and the ValueMember. Using a simple dropdown does not allow you any standard interface to change both values, and or to add a new row to the bound datasource. So, normally, you would set the ExclusiveChoiceList property of the column's style to true to force the user to choose from the list, and not allow adding a new entry.
MTMichel T DallaireDecember 2, 2002 09:09 AM
You understood correctly, but it does not delete the caracters, it deletes the row even if I'm in editing mode. For right now, I supressed the DELETE key event if the field is in edit mode, so only the backspace an be used to erase charaters.
I did not placed the ExclusiveChoiceList because your combobox does not support the extended search in the field. Since the combobox has 3000 items (attach using the display membre and the value membre), like "OB12", "WM31" and "WO12x45", if I press W and then O, it does not get me to WO12 like a normal combobox but returns me to OB12.
I was able to acheive this functionality by making ExclusiveChoiceList to false and having the autocomplete feature working by default. Then I placed code on the validating to verify if the item exists, if not I put CANCEL = true.
I would like to do it a better way, but there are limitation or too low documentation about the namespace of the grid. There is alot of properties we don't even know what is there use and can't seems to find the informations anywhere in all the files installed by the installation package. Also, when I try to use the "Suite Help" in the document section of your product browser, it open a help interface, but the help file won't work.
It would be great to have an automation permitting to have the autocomplete and exclusive feature at the same time like the Access ComboBox when using a binding in the combobox.
I attach a sample file which has the exact same problem. ;-) I'm not the one who has created the database and thete is nothing I can do to change it.
ADAdministrator Syncfusion Team December 2, 2002 10:30 AM
Are you using version 1.5? (or the eval 1.5 version?)
With that version, you should be able to see the class reference, both from Developer Center, and from within Visual Studio. Within Visual Studio, make sure you set your help filter to none. If you cannot see this help, then something went askew during the install. If you submit a DirectTrac support incident, we can email you special installation files for the help to see if we can get that working for you. You do need access to this class reference to get the information on various properties.
Regarding your problem, one thing I did notice in the code you sent is that you are trying to use both comboboxes with DataSources and comboboxes with Choicelists. To do so, you need two different comboboxes. For more information, see this KB article.
The article uses a GridControl.CellModels.Add to add the additonal control. For a GridDataBoundGrid, you would use GridDataBoundGrid.Model.CellModels.Add.
Other than that, the only thing I saw different than the sample I sent you was the CurrentCellChanged handler. Ifadding the second combobox does not make things work properly, then try commenting out this code to see if that has any affect on the deleting.
Also, if you place a stop in the RowsDeleting event, you could post the call stack at that point. Maybe by seeing the callstack, that would give some insight into the problem.
Of course, I could not run your code. If there is someway you can prepare a sample that we can run here, we should be able to home in on what the problem is.
MTMichel T DallaireDecember 2, 2002 08:58 PM
I'm using the eval version because we are trying to decide which company grid we will buy. Since it's not a cheap buy we want to be sure... but right now, I can say your tool is a winner! :-) I was not used to your forum I did not saw you sent me I code. I try this and give you news very fast. I have 10 days left, so I must play it fast! Thank you for your advices.