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