0

i have a problem with refreshing a datagridview.

so i have an unbound datagridview that is not enabled.

rows are added when a button is clicked.

this works the first time, but when i click the button again, the new rows are not all displayed, only the rows that fit the size of the datagridview are shown, but when i resize my form, that's when all the rows are displayed. i think this may be a repaint problem but i don't know the proper code to solve this.

i can enable the datagridview before i add the rows, but i'd like to know if there's another way.

thank you...

3
Contributors
6
Replies
7
Views
6 Years
Discussion Span
Last Post by zepi
0

hi, yes the scrollbars are enabled. but the the whole datagridview is not during the adding of new rows.

0

In design its showing the complete grid in the form?.
in runtime ru setting any width and height property of grid?

0

In design its showing the complete grid in the form?.

yes.

in runtime ru setting any width and height property of grid?

no.

i did not change any property of the grid except for the enable property...

0

hmmm, no i did not. i just used the

datargidview.enabled = false

then i added rows...then

datagridview.enabled = true

was i supposed to use suspend and resumelayout?

i'll try those later...

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.