i have set the anchor property of datagridview to top,left,bottom,right and scroll bars to both and changed nothing in the property of dgv and then used arrays to create columns [by just dgv.columns.add(arr[r,c]);
the columns were created uptill this was fine
but when used with large deta suppose just 50 columns and 100 rows it collapsed . the dgv exceeded the borders of the form . why ? i have also coded the hscrollbar like this
in the form class i just added the arrar to the dgv and wrote
- class form ()
- {
- hscrollbar hb=new hscrollbar();
- private void form_load()
- {
- //added the array to the datagridview by
- string arr=field [r,c]; // the values of field is taken already and that's okay .....
- dgv.columns.add( arr,arr);
- hb.scroll +=hb_scroll;
- }
- void hb_scroll()
- {
- for(int i=0;i
- { dgv.columns[i].headertext= field[r,c]; }
- }
Rajanikant HawaldarPosted Feb 21, 2021, 11:47 AM
Rijwan AnsariPosted Feb 21, 2021, 11:05 AM
Kiran MohantyPosted Feb 19, 2021, 1:09 PM