带有空格的变量名称 [英] variable name with a white space
本文介绍了带有空格的变量名称的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我想要一个带有空格的变量名。
我将这个集合传递给一个gridview,我需要的标题有一个空格,而不是一个下划线
var registrationReport =(从BankMedEntity.Customers中的r获得
选择新的{r.Id,Customer Type = r.CustomerType_Id});
有关我如何完成这项任何想法?
我需要将标题设置为Customer Type而不是CustomerType_Id。
解决方案
p>
AutoGenerateColumns =True
并将您自己的绑定列添加到Gridview。您将能够为列提供您想要的任何名称
I want to have a variable name with a white space. Am passing this collection to a gridview and i need the title to have a white space instead of an underscore
var registrationReport = (from r in BankMedEntity.Customers
select new {r.Id,Customer Type = r.CustomerType_Id });
Any idea on how i can accomplish that?
I need to have the title as "Customer Type" instead of "CustomerType_Id"
解决方案
Turn this to false
AutoGenerateColumns="True"
And add your own Bound columns to the Gridview. You will be able to give the columns whatever names you want
这篇关于带有空格的变量名称的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文