示例#1
0
 public JQTreeView()
 {
     this.ID               = "";
     this.DataUrl          = "";
     this.Width            = Unit.Empty;
     this.Height           = Unit.Empty;
     this.HoverOnMouseOver = true;
     this.CheckBoxes       = false;
     this.MultipleSelect   = false;
     this.ClientSideEvents = new TreeViewClientSideEvents();
 }
示例#2
0
        private string GetStartupOptions()
        {
            StringBuilder            stringBuilder    = new StringBuilder();
            JQTreeView               model            = this._model;
            TreeViewClientSideEvents clientSideEvents = model.ClientSideEvents;

            stringBuilder.AppendFormat("id: '{0}'", model.ID);
            stringBuilder.AppendFormat(",dataUrl: '{0}'", model.DataUrl);
            if (!model.HoverOnMouseOver)
            {
                stringBuilder.AppendFormat(",hoverOnMouseOver:false", new object[0]);
            }
            if (model.CheckBoxes)
            {
                stringBuilder.Append(",checkBoxes:true");
            }
            if (model.MultipleSelect)
            {
                stringBuilder.Append(",multipleSelect:true");
            }
            if (!string.IsNullOrEmpty(clientSideEvents.Check))
            {
                stringBuilder.AppendFormat(",onCheck:{0}", clientSideEvents.Check);
            }
            if (!string.IsNullOrEmpty(clientSideEvents.Collapse))
            {
                stringBuilder.AppendFormat(",onCollapse:{0}", clientSideEvents.Collapse);
            }
            if (!string.IsNullOrEmpty(clientSideEvents.Expand))
            {
                stringBuilder.AppendFormat(",onExpand:{0}", clientSideEvents.Expand);
            }
            if (!string.IsNullOrEmpty(clientSideEvents.MouseOut))
            {
                stringBuilder.AppendFormat(",onMouseOut:{0}", clientSideEvents.MouseOut);
            }
            if (!string.IsNullOrEmpty(clientSideEvents.MouseOver))
            {
                stringBuilder.AppendFormat(",onMouseOver:{0}", clientSideEvents.MouseOver);
            }
            if (!string.IsNullOrEmpty(clientSideEvents.Select))
            {
                stringBuilder.AppendFormat(",onSelect:{0}", clientSideEvents.Select);
            }
            return(stringBuilder.ToString());
        }