访问网格列时出现问题 [英] problem while accessing grid column

查看:121
本文介绍了访问网格列时出现问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

嗨.
我通过使用datatable作为数据源并将autocolumngeneration属性设置为true来绑定网格视图.当我将datatable绑定到gridview时,行数我正确但列数为0.按索引或名称的列标题会给我索引超出范围的错误.提供soln.thanx

hi.
i am binding grid view by using datatable as datasource and autocolumngeneration property set to true.when i am bind datatable to gridview row count i got properly but column count get 0.Eventhough by accessing grid cell by cell i got values properly.But while accessing column header by index or name it gives me error of index out of bound.provide soln.thanx

推荐答案

您的索引超出范围.这意味着它太大或太小.您应该检查代码中的假设,以解决类似这样的问题.然后找出为什么你的假设是错误的.我们需要查看您的代码并知道您的数据源是什么,以帮助进一步解决此问题.
Your index is out of bounds. That means it''s too big, or too small. You should check your assumptions in your code, to get around issues like this. Then work out why your assumptions are wrong. We need to see your code AND know what your data source is, to help fix this further.


这篇关于访问网格列时出现问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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