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

Re: Apply DataView.Sort once, for sorting snapshot, data update should not resort by William

William
Thu Jul 08 10:10:07 CDT 2004

After the First sort that you do in fact want, just disable sorting in the
grid. .AllowSorting = false;

--

W.G. Ryan, eMVP

Have an opinion on the effectiveness of Microsoft Embedded newsgroups?
Let Microsoft know!
https://www.windowsembeddedeval.com/community/newsgroups
"Stefan" <omtslug@yahoo.se> wrote in message
news:10987e1f.0407080624.53cffbca@posting.google.com...
> 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



Re: Apply DataView.Sort once, for sorting snapshot, data update should not resort by omtslug

omtslug
Fri Jul 09 01:16:14 CDT 2004

> 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