本文介绍了GridViewColumn组装错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述


在我的CS代码中,我有2个foreach循环,分别用于GridViewRow和GridViewColumn
我正在使用System.Web.UI.WebControls namespace.for GridViewColumn出现错误,错误为错误3找不到类型或名称空间名称"GridViewColumn"(您是否缺少using指令或程序集引用?)"

Hi
In my cs code i have 2 foreach loop for GridViewRow and GridViewColumn
i am using System.Web.UI.WebControls namespace.for GridViewColumn getting error as "Error3The type or namespace name ''GridViewColumn'' could not be found (are you missing a using directive or an assembly reference?)"

foreach (GridViewRow row in ItemGv.Rows)
   {
   //code --
   }





foreach (GridViewColumn column in ItemGv.Columns)
     {
     //code
     }



你能帮忙吗

谢谢



could you please help in this

Thanks

推荐答案

for(int i=0;i<urgridid.Columns.Count;i++)
{
//write your logic here
}



希望对您有所帮助....



Hope this helps....


foreach (GridViewColumn column in ItemGv.Columns)
{
    //code
}




与:




with:

foreach (var column in this.ItemGv.Columns)
{
    //code -- 
}



希望这可以帮助...



Hope this could help...

Regards,



这篇关于GridViewColumn组装错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-05 08:49
查看更多