Index was out of range. Must be non-negative and less than the size of the collection. Parameter nam
I am developing c# windows application using data grid view, i am retrieve my stored data for grid view, but error is came. this is for my first column code,dgvfind.Columns[0].HeaderText = "SL NO";
dgvfind.Columns[0].Name = "SL NO";
dgvfind.Columns[0].DataPropertyName = "slno";
but error is came first line.
Hide Copy Code
Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: index, Any one please guide me.