对数据视图进行排序 [英] Sorting a dataview
问题描述
我在类型化数据集中有一个数据表的默认视图
。当我第一次使用数据集的内容填充
a树视图时,
记录的排序顺序正确。
之后在数据集中添加一条新记录,然后刷新绘制树例程,新的
记录的排序顺序不正确。
>
我有什么办法可以将更新的表/数据视图的
排序顺序改为
刷新以包含新记录?
以下是一小段代码,用于设置
类型数据集中数据表的
defaultview排序属性。
当我逐步浏览
myComments()数组中的每一行时,记录不在指定的
排序顺序中。
Dim myCommentDR As DesignDataSet.CommentRow
myDesignDS.Comment.DefaultView.Sort =" cDate DESC"
Dim myComments()作为DesignDataSet.CommentRow
myComments =
myProjectDR.GetChildRows(" FK_Comment_Project")
每个myCommentDR在myComments中
........
有没有人知道如何才能解决这个逻辑错误。
谢谢,
Jason。
I have a defaultview of a data table
in a typed dataset. When I first populate
a tree view with the contents of the dataset
the records are in the correct sort order.
After adding a new record to the dataset, and
then refreshing the draw tree routine, the new
record is not in the correct sort order.
Is there anything that I should do to get the
sort order of the updated table/dataview to
refresh to include the new record?
Below is a small segment of code that sets the
defaultview sort property of the datatable in the
typed data set.
When I step through each of the rows in the
myComments() array the records are not in the
sort order specified.
Dim myCommentDR As DesignDataSet.CommentRow
myDesignDS.Comment.DefaultView.Sort = "cDate DESC"
Dim myComments() As DesignDataSet.CommentRow
myComments =
myProjectDR.GetChildRows("FK_Comment_Project")
For Each myCommentDR In myComments
........
Does anybody have any thgouhts on how I can
correct this logical error.
Thanks,
Jason.
推荐答案
在sort属性中,只需在引号中使用列名
- -
OHM(特里伯恩斯)
。 。 。单手人。 。
当你不知道自己在做什么时,过得很快
Jason L James < JA *** @ no-spam.dive-master.org>在留言中写道
news:40 ************** @ news.newnet.co.uk ...
In the sort property, just use the column name in quotes
--
OHM ( Terry Burns )
. . . One-Handed-Man . . .
Time flies when you don''t know what you''re doing
"Jason L James" <ja***@no-spam.dive-master.org> wrote in message
news:40**************@news.newnet.co.uk...
我有一个类型化数据集中数据表的默认视图。当我第一次使用数据集的内容填充树视图时,记录的排序顺序正确。
将新记录添加到数据集后,
记录的排序顺序不正确。
我有什么办法来获得
排序顺序更新了表/ dataview以刷新以包含新记录?
下面是一小段代码,用于设置
中数据表的
defaultview排序属性。类型数据集。
当我逐步浏览
myComments()数组中的每一行时,记录不符合指定的
排序顺序。
将myCommentDR调暗为DesignDataSet.CommentRow
myDesignDS.Comment.DefaultView.Sort =" cDate DESC"
Dim myComments()As DesignDataSet.CommentRow
myComments =
myProjectDR.GetChildRows (QUOT; FK_Comment_Project&q uot;)
每个myCommentDR在myComments中
........
有没有人知道如何才能更正这个逻辑错误。
谢谢,Jason。
I have a defaultview of a data table
in a typed dataset. When I first populate
a tree view with the contents of the dataset
the records are in the correct sort order.
After adding a new record to the dataset, and
then refreshing the draw tree routine, the new
record is not in the correct sort order.
Is there anything that I should do to get the
sort order of the updated table/dataview to
refresh to include the new record?
Below is a small segment of code that sets the
defaultview sort property of the datatable in the
typed data set.
When I step through each of the rows in the
myComments() array the records are not in the
sort order specified.
Dim myCommentDR As DesignDataSet.CommentRow
myDesignDS.Comment.DefaultView.Sort = "cDate DESC"
Dim myComments() As DesignDataSet.CommentRow
myComments =
myProjectDR.GetChildRows("FK_Comment_Project")
For Each myCommentDR In myComments
........
Does anybody have any thgouhts on how I can
correct this logical error.
Thanks,
Jason.
我以为那就是我的完了,除了我想要
它们按降序排序。然而,使用新添加的红绳并不会出现
。
周五,2004年7月16日20:39:20 +0100,"一个人的人(OHM - 特里
伯恩斯\)" < news.microsoft.com>写道:
I thought that was what I had done, except that I want
them sorted in descending order. Yet it doesn''t appear
to work with a newly added redcord.
On Fri, 16 Jul 2004 20:39:20 +0100, "One Handed Man \( OHM - Terry
Burns \)" <news.microsoft.com> wrote:
在sort属性中,只需在引号中使用列名
-
OHM(Terry Burns)
。 。 。单手人。 。
当你不知道自己在做什么时,过得很快
Jason L James < JA *** @ no-spam.dive-master.org>在消息中写道
新闻:40 ************** @ news.newnet.co.uk ...
In the sort property, just use the column name in quotes
--
OHM ( Terry Burns )
. . . One-Handed-Man . . .
Time flies when you don''t know what you''re doing
"Jason L James" <ja***@no-spam.dive-master.org> wrote in message
news:40**************@news.newnet.co.uk...
我有一个数据的默认视图表格
在类型化的数据集中。当我第一次使用数据集的内容填充树视图时,记录的排序顺序正确。
将新记录添加到数据集后,
记录的排序顺序不正确。
我有什么办法来获得
排序顺序更新了表/ dataview以刷新以包含新记录?
下面是一小段代码,用于设置
中数据表的
defaultview排序属性。类型数据集。
当我逐步浏览
myComments()数组中的每一行时,记录不符合指定的
排序顺序。
将myCommentDR调暗为DesignDataSet.CommentRow
myDesignDS.Comment.DefaultView.Sort =" cDate DESC"
Dim myComments()As DesignDataSet.CommentRow
myComments =
myProjectDR.GetChildRows (QUOT; FK_Comment_Project&q uot;)
每个myCommentDR在myComments中
........
有没有人知道如何才能更正这个逻辑错误。
谢谢,Jason。
I have a defaultview of a data table
in a typed dataset. When I first populate
a tree view with the contents of the dataset
the records are in the correct sort order.
After adding a new record to the dataset, and
then refreshing the draw tree routine, the new
record is not in the correct sort order.
Is there anything that I should do to get the
sort order of the updated table/dataview to
refresh to include the new record?
Below is a small segment of code that sets the
defaultview sort property of the datatable in the
typed data set.
When I step through each of the rows in the
myComments() array the records are not in the
sort order specified.
Dim myCommentDR As DesignDataSet.CommentRow
myDesignDS.Comment.DefaultView.Sort = "cDate DESC"
Dim myComments() As DesignDataSet.CommentRow
myComments =
myProjectDR.GetChildRows("FK_Comment_Project")
For Each myCommentDR In myComments
........
Does anybody have any thgouhts on how I can
correct this logical error.
Thanks,
Jason.
嗨Jason
全文是
物品ASC或物品DESC,其中ASC是默认的
我希望这有帮助吗?
Cor
Hi Jason
the full text is
Item ASC or Item DESC where ASC is default
I hopet this helps?
Cor
这篇关于对数据视图进行排序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!