Thread ID: |
Created: |
Updated: |
Platform: |
Replies: |
620 | Jul 17,2002 12:57 PM UTC | Oct 4,2002 10:28 AM UTC | WinForms | 4 |
![]() |
Tags: GridControl |
gridControl1[rowIndex, colIndex + 2].CellType = "ComboBox"; gridControl1[rowIndex, colIndex + 2].ChoiceList = items; gridControl1[rowIndex, colIndex + 2].Text = "Three"; gridControl1[rowIndex, colIndex + 2].ExclusiveChoiceList = true;You can drop the list, by pressing Alt+downarrow, and then the arrow keys can be used to move the selection, followed by Enter to actually select it and close the dropdown. You can place a button in a static cell if you want to do this, and then catch the click on the button. Attached is a file that does this for a TextBox celltype, but the same technique should work for a Static celltype. There is additional information in the user's guide section 3.4 where is goes through the celltypes and shows code snippets of how you might use them. You can also see usage in the the CellControlsGrid sample mentioned above. Also, read the Samples Readme file on the Start menu. There are several samples that create celltypes like a LinkLabel, ImageCell, TreePM cell, etc.
private void gridControl1_CurrentCellChanged(object sender, System.EventArgs e) { if(gridControl1.CurrentCell.Model == gridControl1.CellModels["ComboBox"]) { gridControl1.CurrentCell.EndEdit(); } }
> private void gridControl1_CurrentCellChanged(object sender, System.EventArgs e) > { > if(gridControl1.CurrentCell.Model == gridControl1.CellModels["ComboBox"]) > { > gridControl1.CurrentCell.EndEdit(); > } > } >
This post will be permanently deleted. Are you sure you want to continue?
Sorry, An error occured while processing your request. Please try again later.
This page will automatically be redirected to the sign-in page in 10 seconds.