Hi There Mike !
Could you please tell me how I can make the UltraCombo open and/or scroll through the values using the *keyboard* when the UltraCombo is embedded inside the UltraGrid ?
It's working fine to use the mouse to make the UltraCombo values dropDown ... but how can I scroll through it using the keyboard ?
I've tried setting the UltraCombo in the UltraGrid as the ValueList and EditorControl, and all the values appear correctly and everything ... but how can I use the UltraCombo with the KEYBOARD ?
Thanx in advance,EE
I changed it to UltraDropDown ... doesn't seem to matter.
Alt + Down doesn't to anything ... the UltraDropDown is at the bottom row in my Grid, so if I push alt+down the UltraDropDown goes out of focus ( exits edit-mode if you like ) ... and F4 opens up the UltraDropDown ...
private void FillProjectsComboBox() { Infragistics.Win.UltraWinGrid.UltraGridRow activeRow = this._ucTab1TeamResources.SelectedRow; Employee employee = new Employee(); employee.EmployeeID = System.Convert.ToInt32(activeRow.Cells[0].Text); Kaupthing.ResPlanner.Data.UtilityClasses.Criteria criteria = new Kaupthing.ResPlanner.Data.UtilityClasses.Criteria(); criteria.DisplayStartDate = this._displayStartDate; criteria.DisplayMonthCount = this._displayMonthCount; SortableCollection<Project> projects = DataProviders.ResPlannerDetails.GetAllUnAllocatedProjects(employee, criteria); this._ucUnallocatedProjects = new Infragistics.Win.UltraWinGrid.UltraDropDown(); this._ucUnallocatedProjects.DataSource = projects; this._ucUnallocatedProjects.ValueMember = "ProjectID"; this._ucUnallocatedProjects.DisplayMember = "ProjectName"; this._ucUnallocatedProjects.Rows.Band.Columns["ProjectID"].Hidden = true; this._ucUnallocatedProjects.Rows.Band.Columns["ProjectStatus"].Hidden = true; this._ucUnallocatedProjects.Rows.Band.Columns["AccountManager"].Hidden = true; this._ucUnallocatedProjects.Rows.Band.Columns["ProjectManager"].Hidden = true; this._ucUnallocatedProjects.Rows.Band.Columns["ProjectEndDate"].Hidden = true; this._ucUnallocatedProjects.Rows.Band.Columns["ProjectName"].Header.Caption = ""; this._ucUnallocatedProjects.Rows.Band.Columns["ProjectName"].SortIndicator = Infragistics.Win.UltraWinGrid.SortIndicator.Disabled; this._ucUnallocatedProjects.Width = 300; this._ucUnallocatedProjects.DisplayLayout.AutoFitStyle = Infragistics.Win.UltraWinGrid.AutoFitStyle.ExtendLastColumn; this._ucUnallocatedProjects.RowSelected += new Infragistics.Win.UltraWinGrid.RowSelectedEventHandler(_ucUnallocatedProjects_RowSelected); }
void _ucUnallocatedProjects_RowSelected(object sender, Infragistics.Win.UltraWinGrid.RowSelectedEventArgs e) { try { if (null == e.Row) return; this._ugTab1EmployeeAllocation.ActiveRow.Cells["ProjectID"].Value = e.Row.Cells["ProjectID"].Value; } catch (Exception ex) { MessageBox.Show("Error Occured : Employee Allocation : Projects loading -- " + ex.Message); } }
and in the Initialize_Row:
e.Row.Cells["ProjectName"].ValueList = this._ucUnallocatedProjects;
Can I email you directy ?
rgd,EE
I tried this out before I posted and it worked fine for me.
Our of curiosity, though, why are you using an UltraCombo instead of an UltraDropDown? The UltraDropDown would be more efficient. HOWTO:What is the best way to place a DropDown list in a grid cell?
Can you provide a small sample project demonstrating the problem and post it here so I can take a look?
I should note that I'm implementing this ... but that should not interfear with this ?
private void _ugTab3ProjectSettings_KeyPress(object sender, KeyPressEventArgs e) { // r is both ENTER keys if (e.KeyChar == '\r') { _ucTab3ProjectPhaseEditable.Focus(); _btnTab3SaveProject.BackColor = Color.Yellow; } }
Hi Mike,
Ok ... I see that F4 works, but not Alt + Down ...
But when I press F4, I cannot scroll through the DropDown with arrow-up / arrow-down ...
Why is that ? I need to be able to scroll through the values with arrow-up / arrow-down
rgd,
EE.
Hi EE,
You don't have to do anything special, keyboard support is automatic.
I beleive you can open the dropdown using ALT+Down or F4. Then you can use the arrow keys to scroll through the list and press Enter when you find the item you want.