在列表框控件的多个列 [英] Multiple columns in List box control

查看:114
本文介绍了在列表框控件的多个列的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我怎么能在列表框中显示的两列?

how can i display two columns in a list box?

推荐答案

一个列表框的设计不是显示多列数据。即使Windows窗体版本不直接支持那种数据显示。

A list box wasn't designed to display multi-column data. Even the Windows Forms version doesn't directly support that kind of data display.

您的要求不明确的,而是要最简单的方法是使用一个的 GridView控件控制。它给你很多的功能开箱即用,你可以很容易扩大到更多的列。如果你需要更多的控制权的外观或功能,您可以使用的的DataList 来代替。

Your requirements aren't clear, but the simplest way to go would be to use a GridView control. It gives you a lot of functionality out of the box, and you can expand it to more columns very easily. If you need more control over the look or functionality, you can use a DataList instead.

要获得滚动功能,您可以使用滚动< D​​IV> 或简单地使用GridView控件的分页机制,如果这是适当的。

To get the scrolling ability, you can either use a scrolling <div> or simply use the pagination mechanism of the GridView if that's appropriate.

这篇关于在列表框控件的多个列的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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