Quantcast
Channel: DevNet Questions
Viewing all articles
Browse latest Browse all 8832

Getting text from webpart properties in kentico

$
0
0
Working with kentico 10. I have implemented a custom webpart following the steps from https://docs.kentico.com/k10/custom-development/developing-web-parts/creating-new-web-parts.I have created a webpart property which gets the data from a SQL query like belowSELECT DocumentGuid AS value, DocumentName AS text FROM View_CMS_Tree_Joined WHERE NodeAliasPath LIKE '/SomePath' AND DocumentCulture LIKE 'en-us' ORDER BY DocumentName In the .cs file, I am reading the value selected on this form using the below code as specified in the kentico documentation.public string MyProperty { get { return DataHelper.GetNotEmpty ( GetValue ( "MyProperty" ).ToString ( ), "" ); } } This property gives me the DocumentGuid ('value') from the SQL query above which is working as expected. Is there a method to read the DocumentName ('text') from the SQL query?

Viewing all articles
Browse latest Browse all 8832

Trending Articles