Hello,
i have a Grid, in which a column shall display a bitmap. The Bitmap is being rendered on the fly, according to some bit mask in a hidden column of that grid.
The column also has a drop down editor control assigned to it, so that i can edit the bitmask for the bitmap.
But unfortunately i cant see a way that prevents the cell displaying the textbox in which one normaly enters text. I dont need to edit the cell directly - only via the drop down control.
How can i inhibit the textbox from being displayed and still being able to have the drop down buttons displayed?
this is the part of my sourcecode that handles those settings:
private void ultraGrid1_InitializeLayout(object sender, Infragistics.Win.UltraWinGrid.InitializeLayoutEventArgs e) { if (!e.Layout.Bands[0].Columns.Exists("GrafikSpalte")) { e.Layout.Bands[0].Columns.Add("GrafikSpalte"); e.Layout.Bands[0].Columns["GrafikSpalte"].DataType = typeof(Image); } EditorWithText ewt = new EditorWithText(); DropDownEditorButton ddew = new DropDownEditorButton("Kanaele"); ewt.ButtonsRight.Add(ddew); // this is the user control that needs to displayed after dropdown ddew.Control = kanalauswahl1; e.Layout.Bands[0].Columns["GrafikSpalte"].Editor = ewt; } private void ultraGrid1_InitializeRow(object sender, InitializeRowEventArgs e) { e.Row.Cells["GrafikSpalte"].Appearance.ImageBackground = KanalBitmapErzeugen(Convert.ToUInt32(e.Row.Cells["Spalte 1"].Value)); e.Row.Cells["GrafikSpalte"].Appearance.ImageBackgroundStyle = ImageBackgroundStyle.Stretched; //e.Row.Cells["GrafikSpalte"].Value = KanalBitmapErzeugen(Convert.ToUInt32(e.Row.Cells["Spalte 1"].Value)); }
in initializeRow i can either set the cells value or the cells imagebackground to display the desired image.
Greetings Wolfgang
Hi Wolfgang,
Use an EditorWithCombo instead of EditorWithText. Then set the Style on the cell to DropDownList.
Hello Mike,
that works :-)
but i am helplessly trying to drop down my user control when the cell gets activated :-(
i dont want the user to have to double click the cell or to press the drop down button