如何在datagridview中显示第一个最新数据 [英] How to display latest data 1st in datagridview
问题描述
大家好,
当有事件发生时,有人能告诉我如何在datagridveiw中首先显示最新数据。就像在Windows窗体中开发的应用程序中的@定期触发事件一样。在这种形式中,当事件被触发时,它的日期时间被记录并填充在datagridview中,我能够显示最后一行中的最新数据,但我需要的是我想在最上面的行中显示这个最新的事件&在连续位置发生的早期事件。
提前谢谢
Hi everyone,
Can anybody tell me how to display latest data first in datagridveiw, when an event occurs. Like an event is triggered @ regular intervals in an application i have developed in windows form. In this form as & when a event is triggered its date time is noted & populated in the datagridview, i am able to display the latest data in the last row but what i require is i want to display this latest event in the top row & earlier events that occured in the consecutive locations.
Thanks in advance
推荐答案
HI,>
i对窗口形式没有太多的了解(我工作网页)。
i谢谢你可以..
<表中你有一个名为LastUpdatedDateTime或CreatedDateTime的列的
现在你的sql查询添加一个clouse ORDER BYCONVERT(DateTime,LastUpdatedDateTime, 101)DESC
i haven't too much idea about window form (i works web).
i thanks you can ..
in table you sud have a column with name LastUpdatedDateTime or CreatedDateTime
now in your sql Query add a clouse ORDER BYCONVERT(DateTime, LastUpdatedDateTime ,101) DESC
这篇关于如何在datagridview中显示第一个最新数据的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!