我如何在运行时使用C#获取/访问Datagrid中的模板列名称 [英] How can I get / access template column name in Datagrid at runtime + C#
问题描述
嗨
我想在asp.net 3.5的运行时获取列名(这是datagrid中的模板列),所以我写的像->
I wanted to get column name( which is template column in datagrid ) at runtime in asp.net 3.5, SO I have written like -->
string str =(((DataGridTemplateColumn)((((TemplateColumn)(DataGrid1.Columns [jCount])).ItemTemplate)).columnName;
string str = ((DataGridTemplateColumn)(((TemplateColumn)(DataGrid1.Columns[jCount])).ItemTemplate)).columnName;
但是在这里它给出了一个错误,即由于安全级别而无法访问
But here it gives error that this could not be access because of security level
那么访问此列名称的另一种方法是什么?请向我建议解决方案
So what is the another way to access this column name Please suggest me the solution
谢谢.
推荐答案
Hello Hardik,
谢谢您的发帖!  ;我建议将您的问题发布到MS论坛之一中,
这篇关于我如何在运行时使用C#获取/访问Datagrid中的模板列名称的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!