本文整理汇总了C#中Store.DataBind方法的典型用法代码示例。如果您正苦于以下问题:C# Store.DataBind方法的具体用法?C# Store.DataBind怎么用?C# Store.DataBind使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Store
的用法示例。
在下文中一共展示了Store.DataBind方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: BuildCombo
private void BuildCombo()
{
Store store = new Store
{
ID = "FeedUrlStore",
Reader =
{
new ArrayReader
{
Fields =
{
new RecordField("url"),
new RecordField("text")
}
}
}
};
this.Controls.Add(store);
if (!Ext.Net.X.IsAjaxRequest)
{
store.DataSource = new object[]
{
new string[]
{
"http://www.divergingpath.com/rss.cfm?mode=full", "Aaron Conran's Blog"
},
new string[]
{
"http://feeds.yuiblog.com/YahooUserInterfaceBlog", "Yahoo! UI Blog"
},
new string[]
{
"http://feeds.feedburner.com/jquery/", "jQuery Blog"
},
new string[]
{
"http://sports.yahoo.com/nba/rss.xml", "NBA News"
},
new string[]
{
"http://feeds.dzone.com/dzone/frontpage", "DZone.com"
}
};
store.DataBind();
}
this.feedUrl = new ComboBox
{
ID = "FeedUrl",
FieldLabel = "Entre com a URL da Fedd para adicionar",
EmptyText = "http://colunistas.ig.com.br/gamerbr/feed/",
Width = 450,
ValidateOnEvent = false,
ValidateOnBlur = false,
MsgTarget = MessageTarget.Under,
TriggerAction = TriggerAction.All,
DisplayField = "url",
ValueField = "url",
Mode = DataLoadMode.Local,
StoreID = store.ID,
ForceSelection = false,
Listeners =
{
Valid = { Fn = FeedWindow.SCOPE + ".syncShadow", Scope = FeedWindow.SCOPE},
Invalid = { Fn = FeedWindow.SCOPE + ".syncShadow", Scope = FeedWindow.SCOPE }
},
Template =
{
Html = @"<tpl for="".""><div class=""x-combo-list-item"">
<em>{url}</em><strong>{text}</strong>
<div class=""x-clear""></div>
</div></tpl>"
}
};
}