简体   繁体   中英

what' the simplest way to bind my grid view on one record(distinct different data)

What's the simplest way to bind my grid view to a single data row :

I have the following data for example :

dep_code = 3;
dep_name = "computer science";
boss_num = 356;
boss_name ="Ahmed";

i want to bind those data on my gridview.

I think List of list should be simplest

List<List<string>> list = {{dep_code,dep_name,boss_num,boss_name}};
GridView1.DataSource = list;
GridView1.DataBind();

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM