如何动态地将模板列添加到代码隐藏文件中的radgrid [英] How to Add template Columns dynamically to the radgrid in code behind file

查看:103
本文介绍了如何动态地将模板列添加到代码隐藏文件中的radgrid的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



我有列表中的列名可用。现在我想将列表中的值作为列添加到网格中。列表中的值是更改。我使用以下代码

  foreach (SpGetExamTypeCourses_Result objCourse   lstCourses)
{
TemplateField col = new TemplateField();
col.HeaderText = objCourse.CourseName;
gvSubwisePerformance.MasterTableView.Columns.Add(col);
}



有人可以帮我吗?

解决方案

你好,



请查看 Telerik论坛上的[ ^ ]主题。



问候,


检查我的文章动态添加Temnplate列到Telerik radGrid.Hope我的文章会帮助你。



适用于ASP.NET的Telerik RadGrid帮助程序类 [ ^

Hi
I have the list in which the name of the columns are available.Now i want to add the values in the list as a columns to the grid. the values in the list is changes.I used the below code

foreach (SpGetExamTypeCourses_Result objCourse in lstCourses)
{
    TemplateField col = new TemplateField();
    col.HeaderText = objCourse.CourseName;
    gvSubwisePerformance.MasterTableView.Columns.Add(col);
}


can anyone help me?

解决方案

Hello,

Please have a look at this[^] thread on Telerik forums.

Regards,


Check my Article to add Temnplate Column Dynamically to Telerik radGrid.Hope my article will help you.

Telerik RadGrid Helper Class for ASP.NET[^]


这篇关于如何动态地将模板列添加到代码隐藏文件中的radgrid的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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