使用Studio 2008在MFC中进行CList控件 [英] CList Control in MFC with Studio 2008

查看:106
本文介绍了使用Studio 2008在MFC中进行CList控件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在使用报表视图时,我在使用数据填充列表控件时遇到问题。我可以创建列标题,它们会正确显示。如果我插入项目,它们不会显示,但是,如果我从软件中查询它们就在那里。当我检索计数时,它们会显示适当数量吗?



任何想法?

I am having problems populating the list control with data when I using report view. I can create the column headings and they show up properly. If I insert items, they do not show up, however, if I query them from software they are there. When I retrieve the count, they proper amount shows up?

Any ideas?

推荐答案

你需要在对控件进行更改后执行UpdateData(TRUE)以使其显示。
You need to do an UpdateData(TRUE) after making changes to the control to get it to display.


原因可能是您选择的视图类型可能是ReportView,如果您选择视图为报告,您需要先向ListControl添加列。您可以使用插入列以编程方式执行此操作[ ^ ]或按设计时间。



尝试添加列并检查屏幕。
The reason could be the view type you selected may be 'ReportView' if you choose your view as report, you need to add columns to the ListControl first. You can do this programmatically using Insert Column[^] or by design time.

Try adding the columns and check your screen.


这篇关于使用Studio 2008在MFC中进行CList控件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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