Apply DataView.Sort once, for sorting snapshot, data update should not resort

Tech-Archive recommends: Speed Up your PC by fixing your registry

From: Stefan (omtslug_at_yahoo.se)
Date: 07/08/04


Date: 8 Jul 2004 07:24:25 -0700

Hi.
Is there anyone who knows how I can use a datatable, dataview (and datagrid)
and have the sorting that I specify, DataView.Sort="col dir", to only be
evaluated when set (once) and not have the view resorted constantly.
Currently I'm drowned with Moved events.

If I try to do this smart stuff dv.Sort = "colA ASC"; dv.Sort = ""; the
view immediately goes back to some default sort. (primary key in table)

The datatable holds dynamic data that is update continously but I don't want
my grid rows to fly around.. sigh
Regards & TIA
 /Stefan



Relevant Pages

  • Q: DataGrid Sort
    ... I am setting the DataSource of a DataGrid to be a DataView. ... This obviously makes sense because it is following the sort rule. ... New rows can be added to the DataGrid BUT no sorting will occur. ...
    (microsoft.public.dotnet.languages.vb)
  • Re: Optimizing binding
    ... If you compare Sorting in sql query and in dataview, ... However when user clicks any column header in the datagrid, ... If you save the query result (dataview) in Session ...
    (microsoft.public.dotnet.framework.aspnet.datagridcontrol)
  • When is a dataview refreshed?
    ... I created a DataView of a DataTable from a DataSet. ... view as the source for a datagrid. ... The sorting of the view is based on two of the datatable fields. ...
    (microsoft.public.dotnet.framework.windowsforms.databinding)
  • InvalidCastException: (DataSet) DataGrid.DataSource
    ... Say you have a DataGrid and a DataSet, and you create a dataview to handle ... sorting and filtering and then you assign the dataview to ...
    (microsoft.public.dotnet.framework.windowsforms)
  • Re: Datagrid on two tables
    ... I think you will have to specify the table... ... Curt Christianson ... > Is it possible to have a dataview and a datagrid based on two or more ...
    (microsoft.public.dotnet.framework.aspnet)