Declined
Last Updated: 03 May 2018 08:51 by ADMIN
ADMIN
Dimitar
Created on: 27 Apr 2018 05:53
Category: DataFilter
Type: Bug Report
0
FIX. RadDataFilter - one should know the editor parent type (field or filter) in the EditorInitialized event
Both editors have the same type -  TreeViewDropDownListEditor and there is no way to tell for which one the event is fired. 
2 comments
ADMIN
Dimitar
Posted on: 03 May 2018 08:48
Editor parent type (field or filter) is known in the EditorInitialized event. Please consider the following code:

private void radDataFilter1_EditorInitialized1(object sender, TreeNodeEditorInitializedEventArgs e)
{
	TreeViewDropDownListEditor editor = e.Editor as TreeViewDropDownListEditor;
	DataFilterCriteriaElement criteriaElement = e.NodeElement as DataFilterCriteriaElement;
	if (editor != null && criteriaElement != null)
	{
		if (criteriaElement.EditingElement is DataFilterFieldEditorElement)
		{
			//the field is edited
		}
		if (criteriaElement.EditingElement is DataFilterOperatorEditorElement)
		{
			// the filter type is edited
		}
	}
}

Documentation has been updated!
ADMIN
Peter
Posted on: 27 Apr 2018 10:11
DataFilterCriteriaElement criteriaElement = e.NodeElement as DataFilterCriteriaElement;

and look into 
criteriaElement.EditingElement