how to set gridview.Column
Posted
#1
(In Topic #317)
Regular

I want to set the column from code.
GridView1.Column = 2
But Print GridView1.Column shows "-1"
Any ideas welcome
Posted
Guru

You need Gridview1. Columns. Count = 2.
And a useful trick to use after you have filled your Gridview is to auto arrange the Columns widths with: -
Gridview1. Columns. Width = - 1
Posted
Regular

I have already set up the table with GridView1.Columns.Count = 3 and filled the table with data.
I'm using the _Sort event but would like to force the sorting of a column from code. So after setting up the gridview:-
Code
Public Sub Button1_Click()
GridView1.Column = 2
Print "CC";; GridView1.Column
End
Posted
Regular

does it.
Regards
1 guest and 0 members have just viewed this.


