0

I am a vb.net developer. I am developing a chat application. I have added a Datagridview in my form. When i add row in datagridview programmatically, sometimes its shows me grayspace after the last row.

https://i.stack.imgur.com/riGuH.png https://i.stack.imgur.com/o6ao1.png

See the above image and please give me solution.

Litisqe Kumar
  • 2,512
  • 4
  • 26
  • 40
  • Can you show us the significant part of your code? – Mariano Sep 23 '15 at 07:04
  • I have set properties of datagridview AllowUserToAddRows = false AllowUserToDeleteRows = false AllowUserToResizeColumns = false AllowUserToResizeRows = false AutoSizeRowsMode = AllCells BorderStyle = None ColumnHeadersHeightSizeMode = AutoSize ColumnHeadersVisible = false Dock = Fill RowHeaderVisible = False then just assign the datatable to datasource – user1323942 Sep 23 '15 at 07:51
  • I got Extra spaces after last row and also Scroll is there. – user1323942 Sep 23 '15 at 07:56
  • possible duplicate of [removing the empty gray space in datagrid in c#](http://stackoverflow.com/questions/2122985/removing-the-empty-gray-space-in-datagrid-in-c-sharp) – tezzo Sep 23 '15 at 08:47
  • Its just hide the gray color. but actually as i said, i am working on Chat Application. so i have a Textbox below grid. and it also shows unnecessary space ans scroll. so its looking too bad – user1323942 Sep 23 '15 at 09:16
  • see this URL http://i.stack.imgur.com/o6ao1.png – user1323942 Sep 23 '15 at 09:18

0 Answers0