我有一个存储过程,为每个用户返回下表。 如果用户在类别项目中选择了角色名称,那么所选择的值为y,否则为n
id CategoryID CategoryName RoleName Selected
-------------------------------------------
1 1 Category1 Create y
2 2 Category2 Create y
3 3 Category3 Create y
4 1 Category1 Edit n
5 2 Category2 Edit y
6 3 Category3 Edit n
7 1 Category1 Delete y
8 2 Category2 Delete n
9 3 Category3 Delete n
我需要将它绑定到gridview,如下所示,需要从sp填充列名和值(创建,编辑,删除),如果是,则选择复选框。
Category1 Category2 Category3
------------------------------------------------
[checkbox]Create [checkbox]Create [checkbox]Create
[checkbox]Edit [checkbox]Edit [checkbox]Edit
[checkbox]Delete [checkbox]Delete [checkbox]Delete
如何绑定gridview?