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

S

Stefan

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
 
S

Stefan

After the First sort that you do in fact want, just disable sorting in the
grid. .AllowSorting = false;
But I don't want the sorting possibility to be disabled from the user.
Whenever the user wants to sort this shall be possible but it shall only
be evaluated once on the data when the sort is requested (header clicked).
(sorry if I was unclear)

As it is now rows moves around all the time when data changes and the sort
kicks in..

This isn't really a grid issue, more how the DataView works.. i think.

/Stefan
 
Top