DataFormComboBoxField allways Enabled

2 posts, 0 answers
  1. Andreas Decke
    Andreas Decke avatar
    25 posts
    Member since:
    Oct 2007

    Posted 22 Feb 2012 Link to this post

    Hello,

    my code in AutoGeneratingField Event of DataForm
    // Routertype
    if (e.PropertyName == "RouterType")
    {
      DataFormDataField old = e.DataField;
      e.DataField = new DataFormComboBoxField
      {
        ItemsSource = new RouterTypeList(),
        DisplayMemberPath = "Name",
        SelectedValuePath = "Value",
        DataMemberBinding = old.DataMemberBinding,
        Label = old.Label,
        Mode = old.Mode,
        Description = old.Description
      };
    }

    the DataFormComboBoxField in the DataForm is allways enabled (show the Image).
    I'd like the combo box behaves as textbox.
  2. Maya
    Admin
    Maya avatar
    4062 posts

    Posted 22 Feb 2012 Link to this post

    Hi Richard,

    Actually, this is the edit state of DataFormComboBoxFiled - its editing element - RadComboBox - is visualized. So, what you can try is setting its IsEditable property and will look like the one in this demo. Will that correspond to your needs ? 

    Kind regards,
    Maya
    the Telerik team
    Sharpen your .NET Ninja skills! Attend Q1 webinar week and get a chance to win a license! Book your seat now >>
  3. DevCraft banner
Back to Top