[CLOSED] ConfigOptions, how to add custom option?

  1. #1

    [CLOSED] ConfigOptions, how to add custom option?

    Hello!

    I want add my custom config option in component config. In JS I simple do: new Ext.form.Field({allWathIWant: 'text', qtipText: 'it is my custom qtip'});
    public static void SetLabel(this Field fld, string labelText, string hint)
    {
      // I try this:
      //fld.ConfigOptions.Add("qtipText", new ConfigOption("qtipText", null, string.Empty, labelText));
      // or this:
      fld.ConfigOptions.Add("qtipText", string.Empty, hint);
    }
    // Example of code usage
    
    var checkbox =  new Checkbox() // or ComboBox, or TextField, or ...
                    {
                        ID = id + "_" + FieldInfo.Name,
                        Name = FieldInfo.Name,
                        FieldLabel = FieldInfo.Name,
                        DataIndex = FieldInfo.Name,
                        Width = DefaultFieldWidth,
                        Checked = (bool)(value ?? false)
                    };
    
    checkbox.SetLabel('hello','ololo');
    But result config have not my custom config options. Why? Where I wrong?

  2. #2

    RE: [CLOSED] ConfigOptions, how to add custom option?

    Sorry, I found CustomConfig...
    fld.CustomConfig.Add(new ConfigItem("qtipText", hint, ParameterMode.Value));
    problem resolved.
    Last edited by Daniil; Jun 05, 2012 at 2:53 PM. Reason: Please use [CODE] tags
  3. #3

    RE: [CLOSED] ConfigOptions, how to add custom option?

    Hi,

    If you use Ext.Net (1.0) then you can define own config option in the markup directly
    <ext:Button myConfigOption="option1" ...

    It will be automatically converted to the config option. if you use codebehind then you still need to use CustomConfig collection

Similar Threads

  1. [CLOSED] ConfigOptions
    By dev in forum 1.x Legacy Premium Help
    Replies: 8
    Last Post: Jun 08, 2012, 1:17 PM
  2. [CLOSED] Paging Option in Task
    By speedstepmem3 in forum 1.x Legacy Premium Help
    Replies: 3
    Last Post: May 24, 2012, 1:13 PM
  3. [CLOSED] combo box option
    By rnachman in forum 1.x Legacy Premium Help
    Replies: 2
    Last Post: Dec 27, 2011, 3:20 PM
  4. Select all option in MultiCombo
    By skrishnasamy in forum 1.x Help
    Replies: 0
    Last Post: Aug 12, 2010, 7:02 AM
  5. [CLOSED] ResourceManager RenderImages option
    By tdracz in forum 1.x Legacy Premium Help
    Replies: 3
    Last Post: Dec 04, 2009, 7:49 AM

Posting Permissions