I try to display a combo box cell in a virtual grid. Here is the code I wrote in the QueryCellInfo procedure :
if (e.ColIndex = 4) and (e.RowIndex = 1) then
e.Style.CellType := ''ComboBox'';
e.Style.ChoiceList := Fitems;
e.Style.CellValue := ''one'';
e.Style.ExclusiveChoiceList := true;
FItems is a StringCollection that has been created in the create method of my form.
When I execute my code, I see my comboBox with the right values in the dropdown list.
But if I change the item selected among the dropdown list and then click elsewhere on the grid (on any other cell) I get the error message:
''Specified argument was out of the range of valide values. Parameter name: rowIndex''.
Is there something wrong in what I have done ??
ADAdministrator Syncfusion Team August 24, 2004 08:36 AM
What does your SaveCellInfo look like? Does it set e.Handled = true where you are trying to save this cell value to you external data source.
Your QueryCellInfo would normally set either the e.Style.CellValue or the e.Style.Text from your external data source (and not always set it to "one").