Click here to Skip to main content
15,903,362 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
i am running a program in asp.net in which i am counting columns
but it always return 0 while my grid contains 14 columns

the code i m using is:-
i=gridview1.columns.count
Posted

1 solution

Hi,

Try this:
C#
i = gridview1.Rows[0].Cells.Count;

Hope this helps.
 
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