Hi
I have the strange problem that my ultracombo is only available in a new row (in the addnewbox).
Whenever a row is added and saved (for example: I add, save, exit program, and open again) I can't access the ultracombo for the cell anymore.
Any ideas what might cause this behaviour?
Can you update any of the fields on existing rows? If not, then my guess is that you have set AllowUpdate to true, which disables editing in the existing rows, but does not affect the AddNewRow.
You could also be setting Activation on the cell somewhere in your code, like maybe in InitializeRow or AfterRowUpdate.
Hi Mike
AllowUpdate is set to default, but it doesn' matter if I set it to default, true or false. it's always the same.It seems that the cell does enter editmode since the AfterEnterEditMode is fired. I also tried different styles like Default, DropDown or DropDownList.
I do some stuff with activation in the AfterCellUpdate event, but it doesn't get executed (in this case) and the behaviour is the seeme even when I comment it out.
here is the code I use to assign the UltraCombo to the column:
-------
this.gridUc.VehicleCombo = new UltraCombo(); this.gridUc.VehicleCombo.DataSource = new BindingSource(this.DataSet, this.DataSet.Vehicles.TableName); this.gridUc.VehicleCombo.DisplayMember = "VehicleNr"; this.gridUc.VehicleCombo.ValueMember = "idVehicle"; this.ControllingUltraGrid.Rows.Band.Columns[this.DataSet.Controlling.VehicleNrColumn.ColumnName].EditorComponent = this.gridUc.VehicleCombo;
Any suggestions? :-)
Or do you need further information?
If you are unable to edit a column in the grid, there are only 2 possible reasons.
1) Something in your code is disabling editing.This KB article lists all the ways in which cells, rows, or columns in the grid might be disabled, so I recommend that you check all of them
HOWTO:How can I make a grid or a column, row, or cell in the UltraWinGrid disabled or read-only?
Also note that you may not be setting any of these properties in your code directly. Loading a Layout or a preset into the grid could also be setting them. So I recommend that you check these properties at run-time, in addition to searching your code for any references to them. Or look for "DisplayLayout.Load" calls in your code.
2) The data source does not allow editing. This seems unlikely in your case, since you can change the value in the AddNew row. I don't know of any data sources that let you disabled editing on existing rows, but not on the AddNew row. But I could be wrong.
shame on me :D
the column in my datatable was set to readonly and I didn't notice.
Everything works now, thanks for the hint