Click here to Skip to main content
15,901,284 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
Hi,

i have a Datagridview dgv which will be binded on form load with a datasource.

dgv.DataSource = dt;

user can update or add n no.of rows.

the problem is when user clicks on sav. i have to perform few validations and save.

After Saving when i reloading the data into the grid it giving me exception as

ARGUMENT OUT OF RANGE Exception.
Posted
Comments
Sergey Alexandrovich Kryukov 2-Dec-13 10:52am    
The offending code is not shown, so what help could you possibly expect. Use the debugger, this is all you need.
—SA

First read this Article before doing any work with GridView. It gives you a basic idea about how to and what you can do with GridView.
 
Share this answer
 
Hi try this
dgv.DataSource=null;
dgv.DataSource=........
 
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