Hello!I have troubles with a ultraDropDown in a UltraGridCell:(UltraGridCell: Style=DropDown, ValueList=ultraDropDown1)Please see PDF File:
Thanks for Help!myGilli
Hi Mike!Here my First Row:Here my Second Row:
Now i want to get the Text of the "Model" Column:"Answer: SCENIC N / SCE""Answer: ESPRIMO E"private void ultraButton1_Click(object sender, EventArgs e){foreach (UltraGridRow row in ultraGrid1.Rows){int iDropDownIndex = row.Cells["Column 0"].ValueListResolved.SelectedItemIndex;MessageBox.Show("Answer: " + this.ultraDropDown1.Rows[iDropDownIndex].Cells["Model"].Text);}}
What is the best resolution for this?Thanks 4 your answer & patience
Hi,
As I stated above, using the selected row in the dropdown is not a reliable way to do things, since the dropdown services more than one cell.
So I would use either the Value of the Text property of the cell.
You could achieve the same effect as the code you have here by using the Text property of the grid cell, as opposed to the text property of the cell in the selected row of the dropdown, and it would be more efficient, as well.
this.ultraGrid1.Rows[0].Cells["a"].Text
Hello Mike!I want to find the selected ultraDropDown-Row in my ultraGridCell:...this.ultraGrid1.Rows.Band.Columns["a"].ValueList = this.ultraDropDown1;...void ultraGrid1_CellChange(object sender, Infragistics.Win.UltraWinGrid.CellEventArgse) {int iSelectedRow = this.ultraGrid1.Rows[0].Cells["a"].ValueListResolved.SelectedItemIndex; this.ultraLabel1.Text = this.ultraDropDown1.Rows[iSelectedRow].Cells["b"].Text;}I hope you know what i meen & thanks for answers!
I just wanted to know if you war able to solve this using Mike's suggestions or you still need help? Just let me know. Thank you.
Sincerely,DimiDeveloper Support Engineer, MCPD Infragistics, Inc.
How are you checking the selected row? In what event?
And more importantly, why are you checking the selected row? The selected row in the dropdown is not a reliable value, anyway, since the UltraDropDown control is servicing the entire column. If you want to determine the selected value in a cell of the grid, you should use the Value property of the grid cell.