Hi...I made this window program with Infragistics grid and UltraComboEditor like Infragistics-grid.png.But I have this problem.
Grid's column 2 (column Type) has UltraComboEdit in the cell. It has 2 items (Text, Image ).I want to do like that.If I select Text, the column 3 (column FileName/Value) shows a textBox and column 4 (column Blink)'s checkbox is checked.If I select Image, the column 3 (column FileName/Value) shows a textBox(ReadOnly) and a button ( for openfileDialog) and column 4 (column Blink)'s checkbox is unchecked.I want to know how to register the event handler and the Event function..My codes are as following
private readonly UltraComboEditor _ultraComboEditor1;
ColumnsCollection columns = ultraGrid1.DisplayLayout.Bands[0].Columns; // Initializing columns associating with embedded editors columns[2].EditorComponent = _ultraComboEditor1;
// Populating 5 rows of data for(int i=0;i<4;i++) _ultraComboEditor1.Items.Add(0, StateTypeName[i]);
Sorry, I mised the image file..I uploaded the image file.
Hi Edward,
Thank you for posting in our forums.
What you could do in your case is to handle the CellChange event. In it if a cell from the Types column has changed, change the value of the Blink column and set the appropriate editor to the “FileName/Value” based on whether you want the editor button to be displayed. You might also want to set the Activation property of the cell in order to enable or disable editing.
I have attached a sample which demonstrates this approach.
Please let me know if you have any additional questions.
Thank you for the reply.
You can set the text of the editor button when you are initializing it by setting its text property to “…”. You may also need to increase its width in order to fit the text. As for the apprarance of the cells, you can set the appearance, along with the other settings, in the CellChange event. Create two appearance objects – one for read-only and one for normal cells - and assign these appearances to the cell, based on the selected value.
I have modified my sample in order to demonstrate this suggestion.
Thank you for your help..
I want one more thing....
if column "Type" is "Animation" selected,
I want to show another comboBox that has the value "Image1", "Image2", "Image3" and "Image4".Let me know how to do that...
I mean this.
I want to show another comboBox that has the value "Image1", "Image2", "Image3" and "Image4" in the column "FileName/value".
Creating a dropdown list in a grid cell whose list values are dependent on another cell - Windows Forms - Infragistics Community
But I am a beginer in the Window programming..So, I can't do that...
Dimitar helped me ago.
Column "FileName/Value" is changed according to the column "Type"'s dropdownlist..
If column "Type" is selected "Text", the column "FileName/Value" shows textBox.And if column "Type" is selected "Image", it shows readOnly textBox with one button.And if column "Type" is selected "Animation", it shows comboBox dropdownlist that has the value "Image1", "Image2", "Image3" and "Image4".
The first two things are solved by Dimitar's help.It is very complex thing to me.Please give me a sample example.I can't find the similar example in your website..
Sorry my response is late...
Thank you for your help...
Hello Edward,
I am just checking about the progress of this issue. Let me know if you need my further assistance on this issue.
Thank you for using Infragistics Components.
I have modified my sample in order to demonstrate how to add value list, when the value in the “Type” column is “Animation”. I have added a new case in the switch statement for in the CellChange event for the Animation value. If the value in the “Type” column is “Animation”, it will now assign a ValueList to the "FileName/Value" column with the desired options. If another option is selected in the “Type” column the ValueList is set to null.