Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
340
OptionSetEditor in Grid
posted

Dear,

I want to use the OptionSetEditor in a grid and I have found some examples that uses the UltraOptionSet and adding it to a grid using something likes this: ltraGrid1.DisplayLayout.Rows[2].Cells[1].EditorComponent


this is something I can't use because we have built some framework around infragistics controls. This way it is easier to create custom columns.

this is the code is use to have a column with an OptionSetEditor:

public override void Format(UltraGridColumn column)
		{
			base.Format(column);
			var value1 = new ValueListItem { DataValue = 1, DisplayText = "Yes" };
			var value2 = new ValueListItem { DataValue = 2, DisplayText = "No" };
			var value3 = new ValueListItem { DataValue = 3, DisplayText = "N/A" };
 
			var settings = new DefaultEditorOwnerSettings();
			settings.ValueList = new ValueList { ValueListItems = { value1, value2, value3 }};
			
 
			var editor = new OptionSetEditor(new DefaultEditorOwner(settings));
 
			column.Editor = editor;
 
		}

this code works. It shows the valueList as radiobuttons. The problem I have is that I cant set the value for each row.
If I make a selection in a row and then make a selection in another row, the previous selection gets undone. it's like all the radiobuttons belong to 1 radiobuttongroup

Can this problem be fixed?

Thanks in advanced.