Esempio n. 1
0
        protected override void OnAjaxPreRender()
        {
            base.OnAjaxPreRender();

            StringBuilder sb = new StringBuilder();

            if (PropertyModified("Readonly"))
            {
                sb.AppendFormat("{0}.setReadOnly({1});", XID, Readonly.ToString().ToLower());
            }

            AddAjaxScript(sb);
        }
Esempio n. 2
0
        /// <summary>
        /// 渲染 HTML 之前调用(AJAX回发)
        /// </summary>
        protected override void OnAjaxPreRender()
        {
            base.OnAjaxPreRender();

            StringBuilder sb = new StringBuilder();

            if (PropertyModified("Readonly"))
            {
                sb.AppendFormat("{0}.setReadOnly({1});", XID, Readonly.ToString().ToLower());
            }

            if (PropertyModified("Label"))
            {
                string newLabel = Label;
                if (ShowRedStar)
                {
                    newLabel += GetRedStarHtml();
                }
                //newLabel += LabelSeparator;
                sb.AppendFormat("{0}.f_setLabel({1});", XID, JsHelper.Enquote(newLabel));
            }

            AddAjaxScript(sb);
        }