Ask a Question related to ASP.NET Data Grid Control, Design and Development.
-
Grant Harmeyer #1
DataView.Sort causing duplicate entries in a DataGrid control
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
Grant Harmeyer Guest
-
my DataView won't sort
When I set the Sort on a DataView, it is ignored, and I can't figure out why. I'm using vb.net. After I successfully populate the DataView, I... -
Sort in custom datagrid control
Hello, I have created my custom datagrid control and I would like to sort in that control. I mean I dont want to sort in the webform. I want to... -
Multiple DataBinds fail to reflect change in DataView Sort
Hello all, I have constructed a datatable that is a subset of my dataset. I use a cached dataview as the datasource for my datagrid. For... -
Duplicate Entries
Does anyone have any examples on how to remove dupliate entries from a table? I have 1 temp table that holds about 300,000 records - about... -
datagrid sort custom control question
I am building a custom scrollable grid control. I have created buttons in the header that postback and provide to me the column that was clicked on....



Reply With Quote

