c# - How to make last row in a dataGridView on a Windows Form to be displayed all the time while still allowing the remaining rows to scroll -


i have datagridview has 30 rows in , last row of contains sum of cells in particular column. freeze last row has sum while still allowing remaining rows scroll.

datagridviewpaymentsreceived.rows[datagridviewpaymentsreceived.rows.count-1].frozen = true; 

the above code freezes entire datagridview , doesn't allow me scroll on it. can suggest me way keep last row displayed time when scroll on datagridview?

the easiest solution create second datagridview directly below first. manually populate single row want displayed every time first datagrid binds data.

to make appear totally seamless, don't forget hide column headers in 2nd datagrid:

datagridview2.columnheadersvisible = false; 

see this answer more info.


Comments

Popular posts from this blog

c# - Send Image in Json : 400 Bad request -

jquery - Fancybox - apply a function to several elements -

An easy way to program an Android keyboard layout app -