Last post Nov 16, 2010 03:48 AM by reichel
Jun 08, 2010 04:56 PM|Gentletouch|LINK
I know this has been asked before but I am working in VB and don’t know C#. I want to display a custom name for my tables on a dynamic data page. So far I have located the name of the object in my LinqSQL data context which is SectionTable. When displayed
I want SectionTable to appear as Section.
I know something should go in the namechange class, but I don’t know what! I have got this far:
Partial Public Class SectionTable
Public Class namechange
Thanks in advance.
Jun 09, 2010 07:06 AM|sjnaughton|LINK
Hi Gentletouch, unless I am misunderstanding you what you need is to use the DisplayName attribute which looks somthing like this in VB:
<DisplayName("My Orders")> _
Partial Public Class [Order]
Hope this helps [:)]
Jun 09, 2010 08:50 AM|Gentletouch|LINK
Thanks that worked! Here is the resulting code:).
Partial Public Class Product
Nov 15, 2010 01:18 PM|reichel|LINK
Hi, I´m a begginer in this world of dynamic data, and i´m a bit lost.
As in previous posts you have already resolved how to change the name of a table using the property <DisplayName>, but I´m not sure of doing it correctly.
In my DataBase.designer.vb I put in one of the partial public classes this property and there was no result. Then I tried in the definition os my tables, where I have the Scaffolding property declared, but I can not do it here cause the displayname property
is not available.
So what I have to do?? There is something I´m doing wrong but I can not see it.
Thanks in advanced!!
Nov 16, 2010 03:48 AM|reichel|LINK
I got it!!!
It was my fault, I forgot to Import System.ComponentModel in the Table class and that was why it didn´t work.