Ext技术细节记录(Extjs Small tips)

1.为毛RadioGroup动态添加Radio之后change事件点击后响应上一个Radio呢。

原因是没判断是否选中:

        public static void InitIconList(Ext.Net.RadioGroup iconList)
        {
            string[] icons = new string[] { "BulletYellow", "BulletRed", "BulletPurple", "BulletPink", "BulletOrange", "BulletGreen", "BulletBlue", "BulletBlack" };
            foreach (string icon in icons)
            {
                Ext.Net.Radio iconradio = new Ext.Net.Radio(new Radio.Config { IndicatorIcon = String2Icon(icon, true), SubmitValue=false, Name="IconList",IndicatorText = icon, InputValue = icon });
                iconradio.Listeners.Change.Handler = "if(item.checked==true){#{txtIcon}.setValue(item.inputValue)}";
                iconList.Items.Add(iconradio);
            }
        }

 2.Window加载URL及页面刷新

                    <ext:Button runat="Server" Icon="Add" Text="新增菜单" ID="BtnNew">
                        <Listeners>
                            <Click Handler="top.App.Window1.update();top.App.Window1.title='新增菜单';top.App.Window1.loader.url='SysMenu/NewMenu.aspx';top.App.Window1.show();">
                            </Click>
                        </Listeners>
                    </ext:Button>

 3.ComboBox使用数据绑定时无法设置选中项(Can not select combobox items using store)

原因是数据源中的value是整数型的。设置Mod为Raw即可。

this.ComboBox1.SelectedItems.Add(new Ext.Net.ListItem() 
{ 
    Value = "3", 
    Mode = ParameterMode.Raw 
});

 

 

转载于:https://www.cnblogs.com/ProHack/archive/2013/04/03/Extjs-Small-tips.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值