Click here to Skip to main content
14,928,926 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
For getting the srno in sequence after sorting ,i changed the datagridviews virtual mode property to true
and write the following code

VB
Private Sub DataGridView1_CellValueNeeded(ByVal sender As Object, ByVal e As System.Windows.Forms.DataGridViewCellValueEventArgs) Handles DataGridView1.CellValueNeeded

If e.RowIndex >= 0 AndAlso e.ColumnIndex = Me.slno1DataGridViewTextBoxColumn.Index Then
    e.Value = e.RowIndex + 1
End If

End Sub


Now working fine,but the problem is that i have another unbound column in datagridview(checkbox).and when i
check the checkbox, it is not identifying(that is not returing true,instead of that it is returning 'nothing')IF VIRTUAL MODE IS FALSE IT IS WORKING FINE.

How can i solve above problem
Thank you,,
Posted
Updated 14-Mar-12 11:13am
v2

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