G
Grant Harmeyer
I have a custom object that exposes data through one of its properties that
is of type DataTable. I then use the resultant DataTable from the property
to create a new DataView to bind to a DataGrid control and everything works
just fine.
The problem is when I attempt to apply a sort to the DataView
(<DataViewObj>.Sort = "field_name"
, it will apply the sort, but it
duplicates each row in the DataGrid.
If I comment out the line of code in my method that sorts the DataGrid
(<DataViewObj>.Sort = "field_name"
, this behavior does not occur, but I
lose the functionality of my DataGrid.SortCommand.
I also stepped through the DataTable and the DataView.Table (before setting
the *Sort* property ) and verified that the row duplication isn't happening
in the DataTable, it's limited only to the *sorting* of the DataView.
I apologize if this is very vague, but I have never seen this type of
behavior before. Has anyone experienced anything like this and if so, how do
you bypass it?
(this is an ASP.NET project written in C# if that matters)
Grant Harmeyer
is of type DataTable. I then use the resultant DataTable from the property
to create a new DataView to bind to a DataGrid control and everything works
just fine.
The problem is when I attempt to apply a sort to the DataView
(<DataViewObj>.Sort = "field_name"
duplicates each row in the DataGrid.
If I comment out the line of code in my method that sorts the DataGrid
(<DataViewObj>.Sort = "field_name"
lose the functionality of my DataGrid.SortCommand.
I also stepped through the DataTable and the DataView.Table (before setting
the *Sort* property ) and verified that the row duplication isn't happening
in the DataTable, it's limited only to the *sorting* of the DataView.
I apologize if this is very vague, but I have never seen this type of
behavior before. Has anyone experienced anything like this and if so, how do
you bypass it?
(this is an ASP.NET project written in C# if that matters)
Grant Harmeyer