Hello,
I have been trying to get this to work now for 2 days and I must be missing something cause I don’t think it should be this hard. I have a gridview that I fill without using a datasourceid. All I want to do is be able to sort the columns however the user wants to. I have been able to find C code that helps but no examples with VB. I have got as far as being able to get to the sub gridView_Sorting(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.GridViewSortEventArgs) but cant get past this point. Can anyone please give me a hint or send me to a good example on the web.
Thanks
I have been trying to get this to work now for 2 days and I must be missing something cause I don’t think it should be this hard. I have a gridview that I fill without using a datasourceid. All I want to do is be able to sort the columns however the user wants to. I have been able to find C code that helps but no examples with VB. I have got as far as being able to get to the sub gridView_Sorting(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.GridViewSortEventArgs) but cant get past this point. Can anyone please give me a hint or send me to a good example on the web.
Thanks

Sort with gridview
gdvl
hello,
I fill the gridview from a select statement that i build depending on what the user searches for :
sqlcmdRun.Connection = sqlconRun
sqlconRun.Open()
sqlcmdRun.CommandText = sSQL
sqlcmdRun.CommandTimeout = 300
rdrData = sqlcmdRun.ExecuteReader()
dgrdInput.DataSource = rdrData
dgrdInput.DataBind()
rdrData.Close()
dgrdInput.SelectedIndex = 0
This fills the GV but will not allow me to sort it. I have thought about making a stored proc that I can send the generated sql into but when I run the wizard for the datasourceID i cant figure out what to put for the parameter source so that i can send in my sql when they want to run the search. hope that makes sense.
Thanks again
Robert Kozak
Hi,
How do you add the data to the grid manually
Is the data in some sort of array that can be sorted
If you were using the BindingSource control it would be a one liner: fooBindingSource.Sort = "barColumn"
Charles
nwyork
any ASP.NET related questions should be posted here:
http://forums.asp.net