redefines a single configuration property (or a hash of properties)

void define(string property,any value);


propertystringthe property name or a hash of properties that needs redefining
valueanythe new property value


//redefines the datafeed url
$$('mylist').define("url", "new_data.xml");
//changes the label of the button
$$('button1').define("label", "New value");
//change multiple properties at once
    label:"New label"

Related samples


The component should be refreshed to make the changes come into force.

Redefining "config" object

You can use the config property to get the desired configuration option:

var width = $$("myList").config.width;

config is especially useful when a property is presented by an object:

var fieldWidth = $$('myGrid').config.fields['field_1'].width;

Note, in this case after $$("component_id").config you should write the complete dependency property inheritance chain.

See also
Back to top