hi
i used the following link to create multi select drop down for ultra win grid:
http://devcenter.infragistics.com/Support/KnowledgeBaseArticle.aspx?ArticleID=7698
but i have a problem: after i create the grid for certain cell, and define its datasource, i want to define part of my column as read only but i cant, when checking i see that the grid has 0 rows inside it, athough the datasource has rows in it. only when user click on the cell that is connected to that grid, and the drop down is opened the grid contains the data i binded to it.
why is this happening? how can i solve it
this is the code i wrote:
DropDownEditorButton
buttonConfiguration = new DropDownEditorButton(); //Dropdown Editor Button
UltraGrid theMultiSelectGridConfiguration = new UltraGrid();
theMultiSelectGridConfiguration.BeginUpdate();
theMultiSelectGridConfiguration.UpdateMode =
UpdateMode.OnCellChangeOrLostFocus;
buttonConfiguration.Control = theMultiSelectGridConfiguration;
//The Multi Select "Combo"
UltraTextEditor UltraTextEditorConfiguration = new UltraTextEditor();
UltraTextEditorConfiguration.AfterEditorButtonCloseUp += HandleEditorCloseUp;
UltraTextEditorConfiguration.ButtonsRight.Add(buttonConfiguration);
//add the button to the editor control
DataTable dtConfiguration = new DataTable();
dtConfiguration.Columns.Add(
" ", Type.GetType("System.Boolean"));
"possible values", type);
foreach (var value in testConfiguration.Select(p => GetMyMthod(parameterName, p)).Distinct().ToList())
{
var row = dtConfiguration.NewRow();
row[0] =
false;
row[1] = value;
dtConfiguration.Rows.Add(row);
}
theMultiSelectGridConfiguration.DataSource = dtConfiguration;
//Fill the "Combo" with Data
theMultiSelectGridConfiguration.DataMember =
"";
theMultiSelectGridConfiguration.DataBind();
theMultiSelectGridConfiguration.EndUpdate();
----> when tring to access theMultiSelectGridConfiguration rows i see there are no rows. only after user will click on the grid cell and the grid will open i will see rows.
what can i do?
The grid you are creating in code has no container. Therefore is has no BindingContext, and also will not be disposed when your form closes. Add it to the Controls collection of the form and that should fix it.
Also... the article you are looking it may be obsolete. If you are using the latest version of the grid, then the UltraCombo now has built-in multi-select support.
Hi
i am new to create a ultragrid with ultracombo control.
since my requirement is to select multiple employees for a single workorder(row).
i bind ultracombo using editor component of ultragrid.
i need to have filter option for employee column.
how to create filter option for ultracombo binded to ultragrid?
please help me with any sample codes.
Hi,
UltraCombo does not support the FilterRow functionality since the dropdown list is not editable.
my ultracombo dropdown style is dropdown only.
sample code:
ultraCombo.DataSource = dsLoad.Tables("Employee")
Dim column1 As UltraGridColumn = e.Layout.Bands(0).Columns.Add("Employee") column1.DataType = GetType(Object) column1.EditorComponent = Me.ultraCombo column2.DataType = GetType(Boolean) 'Show the buttons at ALL times e.Layout.Bands(0).Columns("Employee").ButtonDisplayStyle = UltraWinGrid.ButtonDisplayStyle.Always
' Hook this column up to the CheckedListSettings Me.ultraCombo.CheckedListSettings.CheckStateMember = checkColumn.Key Me.ultraCombo.CheckedListSettings.EditorValueSource = EditorWithComboValueSource.CheckedItems Me.ultraCombo.CheckedListSettings.ItemCheckArea = Infragistics.Win.ItemCheckArea.Item Me.ultraCombo.CheckedListSettings.ListSeparator = ";" 'filter options e.Layout.Override.AllowRowFiltering = DefaultableBoolean.True e.Layout.Bands(0).Columns("Employee").AllowRowFiltering = DefaultableBoolean.True
anandraj said:my ultracombo dropdown style is dropdown only.
I don't understand what point you are trying to make. The DropDownStyle has nothing to do with filtering.
"UltraCombo does not support the FilterRow functionality since the dropdown list is not editable."
as you said that dropdownlist of ultracombo not editable.
so only i said about drop down style for ultracombo.
ok could you kindly give the sample code for multiselect combo in ultragrid with auto complete(filter) option.
Sorry, I guess I wasn't clear. I was not suggesting that you need to make the UltraCombo's list portion editable. I am saying that the list is not editable. It's never editable. There is no support for editing the list and therefore no support for editing the FilterRow, so the filter row is currently not supported by UltraCombo.
The only way to filter the UltraCombo's list with the UI is to use the filter icons in the columns headers.
AutoComplete is nothing to do with the FilterRow. That's a completely different sort of filtering. All you have to do for that is set the AutoCompleteMode property.