Click here to Skip to main content
16,003,446 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
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
Posted
Comments
pradiprenushe 28-Aug-12 8:13am    
Post your code for bind grdiview.
Christian Amado 28-Aug-12 8:22am    
Code, please. We need see the code to find the possible problem.
ZurdoDev 29-Aug-12 8:37am    
Need to see the code. You may just be doing it in the wrong event.

1 solution

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.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900