Hi,
I have a problem with valuelists in conjunction with the cellmultiline layout option.
System:
- .NET FW 3.5
- Infragistics v11.2
- ValueList based on a DropDownList
Declaration:
If I try to write a value into a valuelist based column, the cursor steps to the end of the first applicable value. This only happens after I insert the second character and only when the layout option CellMultiLine is activated.
Did you ever had this problem before and know a accurate solution for this?
Sincerly,
Kai
Hi Kai,
Multiline and AutoSuggest will not work together correctly because of some quirky behavior in the TextBox control. The TextBox fires events in a different order when Multiline is turned on, so there's nothing we can do about this. The two features are mutually incompatible.
Sorry to hear that, but thanks for the short and clear answer mike! :)
Cheers,Kai
Hi Mike,
we built a little work-a-round for this issue.
Could you please review these short lines of code and tell me if you see any security or sequence mistakes?
Private Sub ugTableGrid_BeforeEnterEditMode(sender As Object, e As System.ComponentModel.CancelEventArgs) Handles ugTableGrid.BeforeEnterEditMode If Me.ugTableGrid.ActiveCell IsNot Nothing AndAlso Me.ugTableGrid.ActiveCell.Column.ValueList IsNot Nothing Then Me.ugTableGrid.ActiveCell.Column.CellMultiLine = Infragistics.Win.DefaultableBoolean.False End If End Sub Private Sub ugTableGrid_AfterExitEditMode(ByVal sender As Object, ByVal e As System.EventArgs) Handles ugTableGrid.AfterExitEditMode If Me.ugTableGrid.ActiveCell IsNot Nothing AndAlso Me.ugTableGrid.ActiveCell.Column.ValueList IsNot Nothing Then Me.ugTableGrid.ActiveCell.Column.CellMultiLine = Infragistics.Win.DefaultableBoolean.Default End If End Sub
Well... this will work. The problem is that you are turning off CellMultiline for the entire column. So if you enter edit mode on any cell within that column, then all of the other cells display will change to a single line until you leave the column.