Hello.
I have a UltraGrid with 3 columns. When I click on the third column (I am using ClickCell event) the cell became a DropDownList.
Here's my problem... When I click in the cell, it always execute the my code (behind) and never shows my list.
How can I solve my problem?
Code:
private void PropertiesUltraGrid_ClickCell(object sender, ClickCellEventArgs e) {
(...)
case ("Boolean"): ValueList vList = new ValueList(); vList.ValueListItems.Add("sim", "Sim"); vList.ValueListItems.Add("nao", "Não"); e.Cell.ValueList = vList; e.Cell.Style = Infragistics.Win.UltraWinGrid.ColumnStyle.DropDownList; break;
}
Thank you.
Best regards,
Maria
Hello Maria,
I do not know why you are doing this in the mentioned event, but the problem here for me is clearly the firing of the event more than once(everytime you try to open this ValueList in the cell). Please use a condition which guarantees you that the event would fire only once, like the following one:
if (e.Cell.ValueList == null) { Console.WriteLine("FIRED"); ValueList vList = new ValueList(); vList.ValueListItems.Add("sim", "Sim"); vList.ValueListItems.Add("nao", "Nao"); e.Cell.ValueList = vList; e.Cell.Style = Infragistics.Win.UltraWinGrid.ColumnStyle.DropDownList; }
Please do not hesitate to contact me if you need any additional assistance.
I wanted to know if you were able to solve your issue based on these suggestions or you still need help. Please let me know.