Hi Ken, thanks for the quick response. If you have it working, then I need
more assistance please. I've seen it in the docs, but what the heck does "is
not bound to a datasource" mean?
In my case I have a typed DataSet dataset obtained with a Web service call,
and sets the DataSource of the grid to be the DataTable in the dataset. Does
this cause the event not to fire? As mentioned, this seems really odd. Is
there another way of displaying the table in the grid other than setting the
datasource to the table so the event will fire?
I've tried the VirtualMode property in both its flavors and read all 3 pages
of links coming back with Google searching for DataGridView SortCompare.
"Ken Tucker [MVP]" <Ke**********@discussions.microsoft.com> wrote in message
news:E3**********************************@microsof t.com...
Chris,
It fires when the datagridview is not bound to a datasource and
virtual mode is set to false.
Ken
-----------------------
"Chris Botha" wrote:
VS2005 and I have a DataTable displayed in a DataGridView that needs
custom
sorting, with the DataSource of the grid set to the DataTable and the
SortCompare event just won't fire.
Then I found this in the docs "This event occurs only when the
DataSource
property is not set and the VirtualMode property value is false"
This seems really odd but may be true. I can't see what the purpose of
this
event is then, how else will one use the DataGridView other than setting
the
DataSource to something?
How else to do the custom sorting when the user clicks a column header is
also welcome.
Thanks.