Forum
Products
Purchase
Support
Company
My Adillis
Knowledge Base
Forum
Home
/
Support
/
Knowledge Base
Forum
To post messages on the forum, you need to
login
first.
Search
Forum Home
Product Forums
smartDBforms.NET
Labels...
Labels
5/10/2010 3:56:07 PM
Brett
4 posts
Labels
I'm sure this is a dumb question, but I'm demoing the product and I can't figure out how you override the labels that are generated. So, for example I have FirstName and I want "First Name"....Some of the demos show the columns with "friendly" representations, but I don't see in code where they ever get changed from the database column name.
5/11/2010 1:31:45 PM
Adillis Support
43 posts
adillis.com
Re: Labels
Hi Brett,
The labels by default show the column name. The captions and descriptions of each database columns which are used by the labels can be configured in a global resource .resx file. After the file is prepared its name is specified in the Web.config file so that smartDBforms.NET can find it. Also, SmartDataSource has a property ResourceClassKey in which you can specify a specific .resx file which will override the one from Web.config .
Using .resx files the captions and descriptions can easily be translated and smartDBforms.NET will use the correct translation according the the user's locale. In the demo project the file is \App_GlobalResources\NorthwindResource.resx and it also has Spanish translation - NorthwindResource.es.resx.
For MS SQL, there is also an option to have the captions and description as extended properties of the database columns.
For details on the sequence of caption selection and the exact syntax of the .resx entry names you can see the documentation -
smartDBforms.NET User's Guide - Database captions and descriptions
You can also see an example of how to configure the display text of foreign key values in the KB article
HOWTO: Change the display text for the foreign key values
If you have any other questions, we will be more than happy to help you.
Best wishes,
Adillis Support
Adillis - IT solutions http://adillis.com
5/11/2010 2:00:59 PM
Brett
4 posts
Re: Labels
Awesome! SQL Extended properties are perfect!
Page 1 of 1
Product Forums
smartDBforms.NET
Labels...
Flat View
Tree View
Oldest To Newest
Newest To Oldest
Copyright 2006-2010 Adillis
Terms Of Use
Feedback
Contact Us