protected void BindGV()
{
List<List<string>> list = new List<List<string>>()
{
new List<string>() {"Hussain","IT","Hyderabad" },
new List<string>() { "Sharief","IT","Bangalore"},
new List<string>() { "Shaik","IT","Chennai"}
};
gv1.DataSource = list;
gv1.DataBind();
}
我只想在 Gridview 中显示名称和城市。我想像这样使用:
<asp:Boundfield Datafield="" Headertext="Name"/>
在这种情况下如何使用 DataField ?