Datagrid SortCommand does not work ???

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi There

I have a datagrid with a Select(LinkButton) Column followed by several Bound
Columns.

I have enabled the columns to sort and created the correct event handler (I
think) - however the crux of my problem is that when I click on one of the
column headers to sort by it the ItemCommand fires rather than the
SortCommand.

in the .aspx file I have:
OnItemCommand="SalesGroupInitial_ItemCommand"
OnSortCommand="SalesGroupInitial_SortCommand"

which correlate to the .aspx.vb file (I also have an OnItemDatabound event
if that is of any significance)

I have not included the code at this juncture as it is a flat case of the
wrong event firing when I click the Column Header

Any ideas would be very much appreciated

Stuart
 
You can just bind to the DataTable's DefaultView instead - and set the Sort
= the ColumnValue reflected in the index of the eventarg.
 
Back
Top