创建自定义字段类型 [英] Creating a custom field type
问题描述
您好,
我正在http:// www的博客文章后面实施自定义字段类型。 stuartroberts.net/index.php/2012/10/03/enhanced-lookup-field-part-1/并进行一些自定义。
通过sharepoint UI使用时效果很好。
然而,当我尝试通过代码恢复字段值时,我总是收到空。
这并不奇怪:上面的解释文章使用隐藏字段来存储值的自定义,字段本身为空并不奇怪。
我想避免代码上的这种空行为。是否有一些属性或方法我应该在我的自定义字段类型上覆盖以自定义实际字段值的检索?
谢谢!
Dennes
Dennes [http://bufaloinfo.cloudapp.net] Inscreva-se em meu treinamento on-line de T-SQL - [http: //bufaloinfo.cloudapp.net/Cursos/linguagemsql.aspx]
以下是来自GitHub的自定义字段供您参考:
SharePoint 2013过滤后的查找字段
https://github.com/hasangok/sharepoint-2013-filtered-lookup-field
您可以将源代码与项目进行比较。
最好的问候,
Hi,
I'm implementing a custom field type following the blog post at http://www.stuartroberts.net/index.php/2012/10/03/enhanced-lookup-field-part-1/ and making some customizations.
It works perfectly when used through sharepoint UI.
However, when I try to recover the field value by code, I always receive null.
It's not totally a surprise: The explanation on the above article uses a hidden field to store a customization on the value, it's not a surprise that the field itself is empty.
I would like to avoid this empty behavior on the code. Is there some property or method that I should override on my custom field type to customize the retrieval of the actual field value?
Thank you!
Dennes
Dennes [http://bufaloinfo.cloudapp.net] Inscreva-se em meu treinamento on-line de T-SQL - [http://bufaloinfo.cloudapp.net/Cursos/linguagemsql.aspx]
Hi,
Here is a custom field from GitHub for your reference:
SharePoint 2013 Filtered Lookup Field
https://github.com/hasangok/sharepoint-2013-filtered-lookup-field
You can compare the source code with your project.
Best Regards,
这篇关于创建自定义字段类型的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!