I am using a MultiComboBox column in a grid to display attribute types. This is the code to add the column:
GridViewMultiComboBoxColumn col = new GridViewMultiComboBoxColumn(""); col.DataSource = maintenance.AttributesTypesSelectAll(); col.DisplayMember = "attributetype"; col.ValueMember = "attributetypeid"; col.FieldName = "attributetypeid"; col.HeaderText = "Type"; this.grdAttributes.Columns.Add(col);
This is the code to show the correct editor when the column is selected:
private void grdAttributes_CellBeginEdit(object sender, GridViewCellCancelEventArgs e) { if (this.grdAttributes.CurrentColumn is GridViewMultiComboBoxColumn) { if (!this._isColumnAdded) { this._isColumnAdded = true; RadMultiColumnComboBoxElement editor = (RadMultiColumnComboBoxElement)this.grdAttributes.ActiveEditor; editor.EditorControl.MasterTemplate.AutoGenerateColumns = false; editor.EditorControl.Columns.Add(new GridViewTextBoxColumn("attributetype")); editor.EditorControl.Columns["attributetype"].HeaderText = string.Empty; editor.AutoSizeDropDownToBestFit = true; } } }
This works correctly and maps the column to the right value when the column is loaded, but when I edit the column or add a new column it doesn't retain the value. I feel like I'm missing a step but just not sure what at this point. What is the correct way to use a MultiComboBox in a RadGrid to show the text assoicated with an ID field rather than the ID, and then retain that value on add/edits.
Hi,
I have a MultiColumnComboBox with the activated ScrollOnMouseWheel function which make the mouse wheel scroll through the entries when the dropdown is closed, that is what I want.
But by scrolling this way every second item is skipped, and therefore half of the entires cannot be reached.
Is there a way to change that behaviour?
Thanks
Julian
Hi,
how can i do?
i need to Mantain the value of text when not match with the list radmulticolumncombobox
hello
i use radwebcam
how to chose usb webcam from combobox
and i want when i click in camera show live video in picturebox
HI
I want to show blank row at top of multicolumncombobox. My code is in vb.net
Dim dr = dbManager.GetDataReader("SP_NewLotNo_Select", CommandType.StoredProcedure, parameters.ToArray(), connection)
Dim dt As DataTable = New DataTable()
dt.Load(dr)
Try
'Insert the Default Item to DataTable.
Dim row As DataRow = dt.NewRow()
row(0) = 0
row(1) = "---Select---"
dt.Rows.InsertAt(row, 0)
'Assign DataTable as DataSource.
cmbLotNo.DataSource = dt
cmbLotNo.DisplayMember = "LotNumber"
cmbLotNo.ValueMember = "NewLotId"
cmbLotNo.Refresh()
cmbLotNo.SelectedIndex = -1
cmbLotNo.AutoCompleteMode = AutoCompleteMode.SuggestAppend
cmbLotNo.AutoSizeDropDownToBestFit = False
cmbLotNo.BestFitColumns(True, False)
cmbLotNo.Columns(0).IsVisible = False
cmbLotNo.Columns(3).TextAlignment = ContentAlignment.MiddleRight
Me.cmbLotNo.AutoSizeDropDownToBestFit = True
Me.cmbLotNo.AutoFilter = True
Me.cmbLotNo.DisplayMember = "LotNumber"
Dim filter As New FilterDescriptor()
filter.PropertyName = Me.cmbLotNo.DisplayMember
filter.Operator = FilterOperator.Contains
Me.cmbLotNo.EditorControl.MasterTemplate.FilterDescriptors.Add(filter)
Catch ex As Exception
MessageBox.Show("Error:- " & ex.Message)
Finally
dr.Close()
dbManager.CloseConnection(connection)
End Try
its working but not perfectly as i want attaching image for output.
Thanks
Nandan
Hi
I have a problem updating the RadMultiColumnComboBox header when I retrieve which rows in the data grid are to be selected from the database.
the lines are selected with the lines that I set to true, but they are not put in the combo box header until I use the drop down function. Can this be solved or what am I doing wrong.
Private Sub FrmTestTelerik_Load(sender As Object, e As EventArgs) Handles Me.Load
SetCheckStateToActvityTypes()
End Sub
Private Sub SetCheckStateToActvityTypes()
For i As Integer = 0 To RadMultiColumnComboBox1.MultiColumnComboBoxElement.Rows.Count - 1
Dim item As Object = RadMultiColumnComboBox1.MultiColumnComboBoxElement.Rows(i)
Dim id As Integer = item.Cells(0).value
If id = GetSelectetActivityTypeIDFromDB(id) Then
RadMultiColumnComboBox1.MultiColumnComboBoxElement.Rows(i).Tag = Boolean.TrueString
RadMultiColumnComboBox1.Refresh()
End If
Next
End Sub
Best Regard
Stefan HÃ¥kansson Volvo Cars Sweden
first picture is basic ui
second picture is telerik ui
Hi,
I have a multi-column combobox that is data-bound to a binding source control.
Then in the form code I have the following lines:
Me.RadMultiColumnComboBox1.DropDownStyle = RadDropDownStyle.DropDownList Me.RadMultiColumnComboBox1.AutoCompleteMode = AutoCompleteMode.SuggestAppend Me.RadMultiColumnComboBox1.SelectedIndex = -1
The last line, in particular, is important in our case because we want to prevent the selection of the first record by default. Everything works fine except when there's only one record in the list.
When that happens, the textbox element picks up the display member of the lone item as soon as the user clicks the drop-down arrow. The text remains after the pop-up closes even if the user does not explicitly select the solo record. This gives the user the false impression that a value has been set, but in reality the underlying value is still null.
We then found out that the second line of code above is what is causing this unwanted behavior. When commented out, an MCCB with a single record does not exhibit the problem.
We would like to keep the SuggestAppend feature working (i.e., in the case of multiple records), so is there a way to resolve this issue without having to resort to checking the number of records in the list?
Hi,
I have two mc comboboxes in my form. Making a selection on the first one activates a composite filter on the second one so the latter will list fewer items. That works fine when the user clicks on its down arrow to display the now filtered listing. But when the user starts typing on its textbox editor, the list goes away instead of doing a further search or filtering.
Is this a bug or by design?
Thank you,
Sid
I set the datasource to a query ( CatQuery)
This loads the control with 2 columns- serialID and catText
How do I get these two values of the selected item of the dropdown.
Thank you