使用C#在ASP.NET中动态创建gridview [英] Dynamically created gridview in ASP.NET using C#
问题描述
我创建了一个包含动态创建的所有列的gridview。我想阅读一些关于回发的控件。但是没有动态创建的控件被识别。我不能使用页面初始化,因为gridview是根据一些过滤器加载的,过滤器会不时变化。
我想要的方式我可以参考页面回发时动态创建的控件。
我尝试过:
这是我创建动态网格视图时所遵循的链接。
如何使用C#代码创建TemplateField和ItemTemplate? ASP.NET论坛 [ ^ ]
i have created a gridview with all the columns being dynamically created. i want to read some controls on postback. but none of the controls that are dynamically created are being recognised. i cant not use page init as the gridview is loaded based on some filters and the filters keep changing from time to time.
I would like to the the way in which i can refer to the dynamically created controls on postback of the page.
What I have tried:
this is the link which i followed for creating an dynamic gridview.
How can I create a TemplateField and ItemTemplate with C# code | The ASP.NET Forums[^]
推荐答案
这是关于gridview的教程
[< a href =https://msdn.microsoft.com/en-us/library/bb288031.aspx\"target =_ blanktitle =新窗口> ^ ]
This is the tutorial about gridview
[^]
这篇关于使用C#在ASP.NET中动态创建gridview的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!