M.Othman
M.Othman

Reputation: 40

Apply StringPropertyEditor on changing value

I followed the example How to: Supply Predefined Values for the String Property Editor Dynamically (WinForms)

this code only executes when I exit the detailview and open it again :

  protected override void SetupRepositoryItem(
    DevExpress.XtraEditors.Repository.RepositoryItem item) {
    base.SetupRepositoryItem(item);
    foreach (CultureInfo culture in CultureInfo.GetCultures(
        CultureTypes.InstalledWin32Cultures)) {
        ((RepositoryItemComboBox)item).Items.Add(
            culture.EnglishName + "(" + culture.Name + ")");
    }
    ((RepositoryItemComboBox)item).TextEditStyle = TextEditStyles.DisableTextEditor;
}

what I want is to be able to execute this code on value changing (in my case it requires that the value of where we apply the Property Editor is up to date instantly)

cordially

Upvotes: 0

Views: 150

Answers (1)

TobiasSekan
TobiasSekan

Reputation: 11

you need to decorate you Property (in your XPO class or in you Domain Component) with [ImmediatePostData]

Upvotes: 1

Related Questions