Aug 17, 2011, 6:26 PM
[CLOSED] Hint in how to add Custom property to control
Dear All,
Please I need to add custom property to solve the RTL problem in Ext.net .
i did some changes in the source so i add custom property , but i cant find where i can handle it in the extJS files custom codes ,
like i add Direction Property to TextField and its generated in the js code but its not handled.
best regards
Please I need to add custom property to solve the RTL problem in Ext.net .
i did some changes in the source so i add custom property , but i cant find where i can handle it in the extJS files custom codes ,
like i add Direction Property to TextField and its generated in the js code but its not handled.
[Meta]
[Category("5. Button")]
[DefaultValue(Direction.None)]
[DirectEventUpdate(MethodName = "SetDirectionClass")]
[Description("Custom Direction ")]
public virtual Direction Direction
{
get
{
object obj = this.ViewState["Direction"];
return (obj == null) ? Direction.None : (Direction)obj;
}
set
{
this.ViewState["Direction"] = value;
}
}
public override ConfigOptionsCollection ConfigOptions
{
get
{
ConfigOptionsCollection list = base.ConfigOptions;
list.Add("directionClsProxy", new ConfigOption("directionClsProxy", new SerializationOptions("directionCls"), "", this.DirectionClsProxy));
}
}
the final result is
Ext.net.ResourceMgr.init({id:"ctl04",BLANK_IMAGE_URL:"/extjs/resources/images/default/s-gif/ext.axd",aspForm:"ctl01",theme:"blue",icons:["Add"]});Ext.onReady(function(){Ext.QuickTips.init();this.Store1=new Ext.ux.data.PagingStore({proxyId:"Store1",autoLoad:true,reader:new Ext.data.JsonReader({fields:[{name:"FirstName"},{name:"LastName"},{name:"FullName",convert:function(value,record){return record.LastName + ', ' + record.FirstName;}}]}),directEventConfig:{},proxy:new Ext.data.PagingMemoryProxy([{"FirstName":"Bill","LastName":"Foot"},{"FirstName":"Bill","LastName":"Little"},{"FirstName":"Bob","LastName":"Jones"},{"FirstName":"Bob","LastName":"Train"},{"FirstName":"Chris","LastName":"Johnson"}], false)});new Ext.form.FormPanel({id:"ctl05",labelWidth:150,renderTo:"ctl05_Container",height:70,width:400,items:{id:"ctl06",xtype:"textfield",fieldLabel:"TextField with Spinner",plugins:this.Spinner1=new Ext.ux.TextSpinner({listeners:{spin:{buffer:100,fn:function(item){this.field.setValue(Store1.getAt(this.value).get('FullName'));}}},maxValue:4,minValue:0,value:4}),readOnly:true,directionCls:"direction-right",iconCls:"icon-add"},padding:10,title:"Form",renderFormElement:false,url:"/Examples/Form/TextField/Spinner_Plugin/default.aspx?"});});
how can i handle this in rendering action (in the bold text (directionCls:"direction-right"))best regards
Last edited by geoffrey.mcgill; Aug 23, 2011 at 7:04 PM.
Reason: [CLOSED]