如何让新记录显示在最后一行 [英] how to let the new record displaying on the last row

查看:123
本文介绍了如何让新记录显示在最后一行的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好!
我创建一个学生表.使用cxgrid显示学生表.当我添加新的
时 学生记录,新记录始终显示在
光标刚刚停留在哪一行的位置,但是我希望的是,当我添加新记录时,应该将其显示在最后一行.该怎么做?在插入后事件中,是否有任何属性可以在中实现此

hello ,everyone !
i create a student table .using cxgrid to show student table .when i add a new
student record ,the new record alway display over
the place where the cursor stay row just now,but all i hope is that ,is should be display at the last row when i add a new record.how to do that ? are there any properties that can implement this

推荐答案

:
为该位置添加书签,然后关闭并打开数据表.
我记得刷新不起作用.
in after insert event :
bookmark that place and close and open the datatable.
As I remember Refresh doesn''t work.


为此,您可以使用数据集对象的append方法而不是insert方法. TdataSet对象的Append方法始终将记录添加到表的末尾,而insert方法将新记录添加到数据集的光标所在的位置.
For do this you can use append method of dataset object instead of insert method. Append method of TdataSet object always add a record to the end of the table but insert method add new record to where the cursor of dataset is.


这篇关于如何让新记录显示在最后一行的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆