在网格的最后一个索引处添加未绑定的列 [英] adding unbound column to the grid view at last index

查看:76
本文介绍了在网格的最后一个索引处添加未绑定的列的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,
我有带有三个字段(列)的GridView.现在我需要在GridView的row [0] .cells [4]和5处添加两列.任何一个都可以帮助我.

在此先感谢.

Hi All,
I had GridView with three fields(columns).Now i need to add two columns to GridView at row[0].cells[4] and 5. can any one please help me.

Thanks in advance.

推荐答案

尝试一下

Try this

DataControlField colIndex4 = new BoundField();<br />
        colIndex4.HeaderText = "Colunm 4";<br />
        grid.Columns.Add(colIndex4);<br />
<br />
        DataControlField colIndex5 = new CommandField();<br />
        colIndex5.HeaderText = "Colunm 5";<br />
        grid.Columns.Add(colIndex5);


如何绑定无边界网格.< pre lang ="c#"></pre>
how can bind the unbounded grid.<pre lang="c#"></pre>


这篇关于在网格的最后一个索引处添加未绑定的列的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆