Click here to Skip to main content
15,902,276 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi,
How to replace rows in datagridview?
Thanks in advance.
From,
Sanang
Posted
Comments
Sandeep Mewara 26-Jul-10 6:06am    
You need to put more effort in framing the question. You question is not at all clear and doesnot make much sense. Use 'Improve Question' button to update it with what you are trying to do and the issue faced.
Simon_Whale 27-Jul-10 7:37am    
to add to Sandeep's comments please also show what you have tried so far, As we might be able to point you in the right direction or show you were you are going wrong

1 solution

I know it's too late, still this might help..
You want something like this?!

VB
Private Sub ReplaceRowAt(ByVal index As Integer, ByVal replaceWith As DataGridViewRow, ByRef dgv As DataGridView)
  dgv.Rows.RemoveAt(index)
  dgv.Rows.Insert(index, replaceWith)
End Sub
 
Share this answer
 

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