6
Answers

How hide and Change the columns name in the datagridview?

Vikas Ahlawat

Vikas Ahlawat

15y
6.9k
1

Hi in my Student management system i have taken a table , in this i have taken columns as class , section, paper1,paper2,...........paper10

 Because every class have diff - diff no of subject and no. of papers, so there i can not give the subject name in the place of papers.

For solve this problem i have maked a table in this i store the subject name class wise by this table we can know that ex: Paper1 is the English subject paper of the class 1st paper1 is the Math paper for class 10th.
 Now  when i display the students marks in the Datagridview then all the Paper1.....Paper10 display but i want to hide the unecessory column from there because if class 2 have only 6 paper then last for disappear.
 and also want to dispaly the subjects name from my table. By replacing the Paper1...2 etc.
How can i do this?
i can make table for every class then it became very big,but became very easy, to do both things
Can we make dyanmic table which contain columns accroding to the class like if class 1st have 4papers then it contain 4column , and for class 2nd it contain 6 columns? Please help me
Answers (6)