MyException - 我的异常网
当前位置:我的异常网» C# » C#新建cs中为什么datagridview没数据的

C#新建cs中为什么datagridview没数据的(2)

www.MyException.Cn  网友分享于:2013-02-20  浏览:10次

                        chezhan_ip.Rows.Add();
                        chezhan_ip.Rows[i].Cells[0].Value = lineip.line1_name[i];
                        chezhan_ip.Rows[i].Cells[1].Value = lineip.line1_ip[i];
                        
                    }
                    MessageBox.Show(lineip.line1_name.Count().ToString()+"ffffffff"); ///这句话就不能显示~~~
                    break;

                case 2:
                    for (int i = 0; i < lineip.line2_name.Count(); i++)
                    {
                        chezhan_ip.Rows.Add();
                        chezhan_ip.Rows[i].Cells[0].Value = lineip.line2_name[i];
                        chezhan_ip.Rows[i].Cells[1].Value = lineip.line2_ip[i];
                    }
                    break;

                case 3:
                    for (int i = 0; i < lineip.ceshi_name.Count(); i++)
                    {
                        chezhan_ip.Rows.Add();
                        chezhan_ip.Rows[i].Cells[0].Value = lineip.ceshi_name[i];
                        chezhan_ip.Rows[i].Cells[1].Value = lineip.ceshi_ip[i];
                    }
                    break;
            }

        }

求指导,,,在新建的cs中调用form1的datagridview1,然后给datagridview进行赋值操作。。。但是datagridview木有数据显示。。。。。

文章评论

软件开发程序错误异常ExceptionCopyright © 2009-2015 MyException 版权所有