Is it possible don’t sort a single column?
In a DataBound grid I have an empty column, and into I will insert a progressive count. If I sort some columns, also my progressive count will sort.
Thanks.
Example:
|A|B|C|
b f
c f
a f
For i As Int32 = 0 To Grid1.DataRows.Count – 1
Grid1.DataRows(i).Cells(“C”).Value = i
Next
|A|B|C|
b f 1
c f 2
a f 3
Grid1.Columns(“A”).SortDirection = SortDirection.Ascending
For i As Int32 = 0 To Grid1.DataRows.Count – 1
Grid1.DataRows(i).Cells(2).Value = i
Next
|A|B|C|
a f 3 ?
b f 1 ?
c f 2 ?
I wish:
|A|B|C|
a f 1
b f 2
c f 3
Imported from legacy forums. Posted by AndreaZ (had 809 views)