在列表视图中创建动态列 [英] Create Dynamic Columns in Listview
本文介绍了在列表视图中创建动态列的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
有什么方法可以在运行时在Listview中创建动态列吗?
在此先感谢
Is there any way to create dynamic columns in Listview at runtime?
Thanks in advance
推荐答案
是.
根据问题,我应该在这里停下来,但是...在这里,您可以了解更多信息: ^ ]
首先,在此处进行类似的讨论. [
Yes.
I should have stopped right here based on the question, but... here you go for more info: GS Result[^]
To start with, a similar discussion here.[^]
我有同样的问题,目前还没有足够好的解决方案.
以前的解决方案"通常是针对.NET C#的,但据我了解, ListView.Columns不适用于ASP.NET
I have the same problem and no good enough solution for now.
Previous "solutions" are usually for .NET C#, but as far as I understand, ListView.Columns is not available for ASP.NET
private void AddColumn(ListView lv, string title, int width)
{
ColumnHeader column = new ColumnHeader();
column.Text = title;
column.Width = width;
lv.Columns.Add(column);
}
这篇关于在列表视图中创建动态列的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文