if you can do it with DataList, why do you need DataGrid??? did the user ask you to implement in DataGrid? if yes, did you ask him/her why so?you have to understand how DataGrid works, each DataItem (DataRowView...) generates a row, so unless you change your DataTable (for example, manually create second column and copy the values in row 2/4/6/... to the second column of row 1/3/5 and delete row 2/4/6/...), you can't get what you want
解决方案 »
- 不用模板页,写一个集成Page的类,要有模板页的效果
- java里面绑定数据的时候有控件可以用
- 请问一个简单的问题,自定义类的问题
- 急急急急!!!!!怎样将文本编辑器里的图片下载到本地
- datatable如何取多行多列中的某一列某一行的值?
- 有母版页的登录校验该写在哪个事件里?
- asp.net+mapxtreme的一个很普通的问题,一解决就给分
- 如何在radiobutton中加入一个文本框或使其value绑定在一个textbox中?
- 一个自己写的ASP.Net论坛程序,欢迎下载试用
- 100分奖励!看谁能得满分!一个硕士毕业设计,占毕业成绩的40%
- 关于配置的问题
- 如何在vbscript代码中引用C#写的组件中的函数??
<HeaderStyle ForeColor="White" Width="200px" />
<ItemTemplate>
<table cellSpacing="0" cellPadding="0" width="100%" border="0">
<tr>
<td><%# DataBinder.Eval(Container.DataItem,"Column11")%></td>
<td><%# DataBinder.Eval(Container.DataItem,"Column12")%></td>
</tr>
<tr>
<td><%# DataBinder.Eval(Container.DataItem,"Column21")%></td>
<td><%# DataBinder.Eval(Container.DataItem,"Column22")%></td>
</tr>
<tr>
<td><%# DataBinder.Eval(Container.DataItem,"Column31")%></td>
<td><%# DataBinder.Eval(Container.DataItem,"Column32")%></td>
</tr>
</table>
</ItemTemplate>
</asp:TemplateColumn>