public JQDropDownList() { this.ID = ""; this.Width = 100; this.Height = 100; this.DropDownWidth = null; this.Items = new List <JQListItem>(); this.TabIndex = 0; this.ItemTemplateID = ""; this.HeaderTemplateID = ""; this.FooterTemplateID = ""; this.ToggleImageCssClass = ""; this.ClientSideEvents = new DropDownListClientSideEvents(); }
public JQDropDownList() { this.ID = ""; this.Width = 100; this.Height = 100; this.DropDownWidth = null; this.Items = new List<JQListItem>(); this.TabIndex = 0; this.ItemTemplateID = ""; this.HeaderTemplateID = ""; this.FooterTemplateID = ""; this.ToggleImageCssClass = ""; this.ClientSideEvents = new DropDownListClientSideEvents(); }
private string GetStartupOptions() { StringBuilder stringBuilder = new StringBuilder(); JQDropDownList model = this._model; DropDownListClientSideEvents clientSideEvents = this._model.ClientSideEvents; stringBuilder.AppendFormat("id:'{0}'", model.ID); stringBuilder.AppendFormat(",width:{0}", model.Width.ToString()); stringBuilder.AppendFormat(",height:{0}", model.Height.ToString()); if (model.DropDownWidth.HasValue) { stringBuilder.AppendFormat(",dropDownWidth:{0}", model.DropDownWidth.ToString()); } if (model.TabIndex != 0) { stringBuilder.AppendFormat(",tabIndex:{0}", model.TabIndex.ToString()); } if (model.Items.Count > 0) { stringBuilder.AppendFormat(",items:{0}", JsonConvert.SerializeObject(model.SerializeItems(model.Items))); } if (!string.IsNullOrEmpty(model.ItemTemplateID)) { stringBuilder.AppendFormat(",itemTemplateID:'{0}'", model.ItemTemplateID); } if (!string.IsNullOrEmpty(model.HeaderTemplateID)) { stringBuilder.AppendFormat(",headerTemplateID:'{0}'", model.HeaderTemplateID); } if (!string.IsNullOrEmpty(model.FooterTemplateID)) { stringBuilder.AppendFormat(",footerTemplateID:'{0}'", model.FooterTemplateID); } if (!string.IsNullOrEmpty(model.ToggleImageCssClass)) { stringBuilder.AppendFormat(",toggleImageCssClass:'{0}'", model.ToggleImageCssClass); } if (!string.IsNullOrEmpty(clientSideEvents.Show)) { stringBuilder.AppendFormat(",onShow:{0}", clientSideEvents.Show); } if (!string.IsNullOrEmpty(clientSideEvents.Hide)) { stringBuilder.AppendFormat(",onHide:{0}", clientSideEvents.Hide); } 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); } if (!string.IsNullOrEmpty(clientSideEvents.Select)) { stringBuilder.AppendFormat(",onInitialized:{0}", clientSideEvents.Initialized); } if (!string.IsNullOrEmpty(clientSideEvents.Select)) { stringBuilder.AppendFormat(",onKeyDown:{0}", clientSideEvents.KeyDown); } return(stringBuilder.ToString()); }