TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Arijeet Ghosh
NA
210
36.8k
why's the anchor property of the dgv doesn't work with arrays ?
Feb 19 2021 9:15 AM
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.columncount;i++)
{ dgv.columns[i].headertext= field[r,c]; }
}
Reply
Answers (
3
)
Bot Error: Command Failed
In SQL Query - How to get Most recent records in custom query