There are times when in the LookUp for strings detail you want to insert only certain values. For this list opened on the LookUp form you want to restrict. However, AjaxGroupEdit has its own characteristics that must be considered. Resulting in the code looks a little more complicated than at the restriction to “normal” LookUp.

Suppose we have the following model data:

When you add a row of detail the “Mastergrader” for property “Svistoplyaska” should be available only property “СвойствоЛукапМастера2 from Loopmaster”.

In application code this will look like the following:

/// <summary> 
/// It is best to write the business logic, operating only with the data object. 
/// </summary> 
protected override void PreApplyToControls()
	ctrlКомната.AddLookUpSettings(Information.ExtractPropertyPath<МастерАгрегатор>(r => r.ЛукапМастер), new LookUpSetting
		LimitFunction = FunctionBuilder.BuildEquals<ЛукапМастер>(x => x.[СвойствоЛукапМастера2], [ЗначениеСвойстваЛукапМастер])


On a real example as follows:



ctrlКомната.AddLookUpSettings(Information.ExtractPropertyPath<Комната>(r => r.НазначениеКомнаты), new LookUpSetting
		LimitFunction = FunctionBuilder.BuildEquals<НазначениеКомнаты>(x => x.Актуально, true)

View in the app

Note: If a limit on the LookUp form is not applied, you must check whether the specified name artisan classes, performances and properties.