Datagridview error : Value' should be between 'minimum' and 'maximum'
Value of '352' is not valid for 'Value'. 'Value' should be between 'minimum' and 'maximum'. Parameter name: Value
at System.Windows.Forms.ScrollBar.set_Value(Int32 value)
at System.Windows.Forms.DataGridView.ScrollRows(Int32 rowCount, Int32 deltaY, ScrollEventType scrollEventType)
at System.Windows.Forms.DataGridView.ScrollRowsByCount(Int32 rows, ScrollEventType scrollEventType)
Does anyone know how to resolve this issue ?
I am using DataSource property and not Rows.add() Thanks in advanceIt got resolved by dataGridView1.PerformLayout() after populating data.
The similar kind of problem was faced by me too recently , I was using datagridview for entering the data in my database , everything worked fine but whenever I try to edit the data then it throws exception the moment I crossed 18 th row . The solution to this problem is use dgv.PerformLayout(); , call to this function will resolve the problem and exception wont be thrown
精彩评论