Click here to Skip to main content
15,909,747 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
how can i delete the last row in datagridview which is empty?
Posted
Updated 4-Dec-17 18:31pm
Comments
Sandeep Mewara 3-May-12 10:41am    
Where from this empty row came?

Is EmptyDataRow(if ASP.NET) defined for your grid that makes you feel that one extra data row is there when no data?

In properties of datagridview set

AllowUserToAddRows property to False


Just it!


Best of luck...........
 
Share this answer
 
Comments
aliprogrammer 3-May-12 10:43am    
Yes. it worked. Thanks
Mantu Singh 3-May-12 10:44am    
U r welcome.........!
That last row with an asterisk (*) in the header can be removed by setting the AllowUserToAddRows property to false.

If you still want to let users to type data into a blank row then you'll have to give them a button to press and add the row programmatically.

Alan.
 
Share this answer
 
Comments
aliprogrammer 3-May-12 10:45am    
Yes. Thanks. It worked

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900