Forum
smartDBforms.NET for ASP.NET 2
 
 
Knowledge Base Forum
To post messages on the forum, you need to login first.
SearchForum Home
  Product Forums  smartDBforms.NET  Foreign key rel...
 Foreign key relation texts
 
 5/9/2007 12:49:25 PM
tedted
3 posts


Foreign key relation texts
Thank you for the previous answer. Your product really saves lots of time.I have one more specific question. One of my columns MaterialID links to the table Materials and holds the id of the material. In the form when editing it appears as a drop down list with all material ids in it. Is there a way to modify the display text for the drop down entries? I want instead of the material id in the drop down to be displayed the material name from the MaterialName column.
I would appreciate your help.
 5/10/2007 10:49:20 AM
Adillis Support
27 posts
adillis.com


Re: Foreign key relation texts
You can do this easily by modifying the /App_GlobalResources/smartDBresources.resx file. Add an entry with name Materials.RowCaptionExpression and as a value enter the expression that will construct the drop down entries' captions. In you case this will be MaterialName. You also could enter more complex expression: MaterialName + '(' + ID + ')', where ID is the primary key column. As a result the drop down will display: MaterialName1(ID1), MaterialName2(ID2)...
You can also follow the knowledge base 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/2007 11:00:15 AM
tedted
3 posts


Re: Foreign key relation texts
There was not such file smartDBresources.resx and I created it and entered the values. But it still shows the old texts. Is there something else I should do?
 5/11/2007 4:36:49 PM
Adillis Support
27 posts
adillis.com


Re: Foreign key relation texts
Hi,
If you have created the resource file, in order it to be used by smartDBforms.NET the name of the resource should be registered in Web.config in the smartDBforms.NET tag.
You should add the following property to it: resourceClassKey="smartDBresources".
After that the smartDBforms.NET tag in Web.config should look like this:
<smartDBforms.NET templatesLocation="~/smartDBtemplates/TemplatesStorage.ascx" resourceClassKey="smartDBresources"/>

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
  Product Forums  smartDBforms.NET  Foreign key rel...
Copyright 2006-2008 Adillis Terms Of Use Feedback Contact Us