Вопрос

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();
Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top