Vikas Ahlawat

Vikas Ahlawat

  • NA
  • 564
  • 818k

How hide and change the conlumns name in datagridview accroding to ......

Oct 22 2009 12:39 PM
For More clearly understand my problem follow this link
http://www.c-sharpcorner.com/Forums/ShowMessages.aspx?ThreadID=67418


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 (2)