.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Register
 
Win Surprise Gifts!!!
Congratulations!!!


Post New Web Links

google map custom field type Rendering problem

Posted By:      Posted Date: September 19, 2010    Points: 0   Category :SharePoint
 

Hi all,

I have rebuild the codeplex project of googlemapfield in visual studeio 2010 for sharepoint foundation 2010.It is able to show custom field when adding new column. I am unalbe to get  google map in display form.. I don't know where it went wrong. I am able to load a text pargaraph from control template file which is delcared in <div> as <p><cite>The Complete Manual of Typography</cite>, James Felici</p>. But not google map.

I have added safe control in web.config file and also enabled activex control scriptings in IE.

Here is my .ascx file code

<%@ Assembly Name="GoogleMapField64,Version=1.0.0.0, Culture=neutral, PublicKeyToken=268a24657b14d504" %>
<%@ Assembly Name="Microsoft.Web.CommandUI, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c"  

View Complete Post


More Related Resource Links

Custom field type from LookupMulti only saves 1 value

  

hi, i'm having this problem:

http://social.msdn.microsoft.com/Forums/en-US/sharepointdevelopment/thread/43bddecf-65f5-4ac7-b265-bd290378440a

i'm trying to create a custom field type that works like a multiple lookup, but when i select multiple values only one is ever saved. has any one else ever run into the same problem who might be able to point me in the right direction?


Creating a custom drop down field type with SelectedIndexChanged Event

  
Hi All, I am trying to create a custom drop down field type and I was able to acheive that using the MS link http://msdn.microsoft.com/en-us/library/bb861799.aspx. As per the link, once the custom field is created we can override the "Validate" method to write the Validation logic and that works fine for me too. However I am facing a challenge even before going to Validate . Let me explain my actual requirements here. I need to build a custom drop down field and expose the field to the user in "Edit Properties " Page of a document library. Along with this field, I will be having some OOB site columns in the Edit Properties Page (Ex: Title, Subject etc)  . When user selects a value in the drop down, I need to hide/show few OOB site columns based on certain criteria.  I am facing a challenge of how to capture the "SelectedIndexChanged " event for the Custom drop down field in Sharepoint (Can we wire the SelectedIndexChanged event to a custom dropdown field type) ? Is this acheivable in SP 2010 Custom field type ? If so, how can I do it ? Can any of you kindly help me here?   Regards, Yesh

Regarding sharepoint custom field type

  
There is column I have created using custom field type .I want the grid view that i have in my new/edit mode same to be displayed in my display mode also. What should be the appropriate approach ? Here is my code in which i ma getting error ..so i decided to change my approach..I thought changing in render pattern of field definition file can work... using System; using System.Collections.Generic; using System.Linq; using System.Text; using Microsoft.SharePoint.WebControls; using System.Web; using System.Web.UI.WebControls; using Microsoft.SharePoint; using System.Xml; using System.Reflection; using System.Web.UI; using System.Collections; using System.Data;     namespace UserControl_ClassLib {     public class UserControl_ClassLibControl : BaseFieldControl     {         protected UserControl preview_UC;         protected GridView gridViewValue;         protected GridView grdDataView;         //protected TextBox txtbox;               protected override string DefaultTemplateName         {             get { return "UserControl_ClassLibCo

Regarding sharepoint custom field type

  
There is column I have created using custom field type .I want the grid view that i have in my new/edit mode same to be displayed in my display mode also. What should be the appropriate approach ? Here is my code in which i ma getting error ..so i decided to change my approach..I thought changing in render pattern of field definition file can work... using System; using System.Collections.Generic; using System.Linq; using System.Text; using Microsoft.SharePoint.WebControls; using System.Web; using System.Web.UI.WebControls; using Microsoft.SharePoint; using System.Xml; using System.Reflection; using System.Web.UI; using System.Collections; using System.Data;     namespace UserControl_ClassLib {     public class UserControl_ClassLibControl : BaseFieldControl     {         protected UserControl preview_UC;         protected GridView gridViewValue;         protected GridView grdDataView;         //protected TextBox txtbox;               protected override string DefaultTemplateName         {             get { return "UserControl_ClassLibCo

Custom field type - set value doesn't work when field is hidden

  
Hi, I have a simple custom field type which gets a value from the Property Bag and sets that value to a label. This works fine as long as the field is set to Optional (the field is a site column and is part of a site content type), but if I set it to Hidden, the value doesn't get set. public override void UpdateFieldValueInItem()         {             this.EnsureChildControls();               if (this.ControlMode == SPControlMode.New)             {                 this.Value = GetChosenConsole();             }         }   Does anyone know why this is and what I need to do in order for it to work even though it's hidden? Thanks!

custom field type editor

  

hi,

I like to create and custom field type editor control starting from the lookupfieldeditor but I not sure how to begin.
i tried to inherit the lookupfieldeditor in my class but this gives me and nullpointerexeption.

does anyone got an example?

thanks


Problem while creating task with custom content type in sharepoint workflow

  

Hi all,

I am trying to create task with custom content type in sharepoint statemachine workflow. But it is showing "Error Occured" after task creation code is excecuted. can anyone tell me what is the problem.

Task Content type

 

  <ContentType  ID="0x01080100A707C0079E8547c0A87515457DB90629"
      Name="TaskContentTypeForLeaveApproval"
      Group="Development"
      Description="Workflow Task"
      Version="0"
      Hidden="TRUE">
    <FieldRefs>
      <FieldRef ID="{9da97a8a-1da5-4a77-98d3-4bc10456e700}" Name="MyComments" DisplayName="MyComments"  />
     </FieldRefs>
    <XmlDocuments>
      <XmlDocument NamespaceURI="http://schemas.microsoft.com/sharepoint/v3/contenttype/forms/url">
        <FormUrls xmlns="

Regarding Creating Custom Field type Class Inheriting from IFieldEditor Interface and UserControl C

  

How to enable the hidden labels On Create Column Page after selecting our Custom Field type before just ckicking OK so that all those labels appear.


Set Custom Properties for a custom field type within a content type feature

  

Hi,

I have created a custom field type (derived from SPFieldText) and added a custom property "MyProperty". Now what I am looking for is, I need to use this field type in my Content Type feature.

How can I specity my custom property within a Content Type definition file, just like what we do with OOB field types?

I've seen a workaround here but it only solves only the problem of XSD validation. Site column is getting installed properly but the value that I specify in the feature is not set for the column after installing the feature.

Thank in advance

Arun


Arun D Gangadharan

Add a RichTextField in the "Additional Column Settings section" on custom field type

  

Hi!

I have created at custom field type that will be used in a Custom List.

Almoste everything works ok, but there is one feature I can't figure out how to solve.

When I create the new column I want a custom property, displayed in the Addidional Column Settings sections. I know that I can easily solve this by adding a field in the xml-file, in the propertyschema section.

I want the custom property to be a RichTextField, but all I manage to create is a multiline textbox... Is it possible to do this??

Here is the xml I am using...

<FieldTypes>
  <FieldType>
    <Field Name="TypeName">UserInfo1</Field>
    <Field Name="ParentType">Text</Field>
    <Field Name="TypeDisplayName">Login User Information</Field>
    <Field Name="TypeShortDescription">Current Login User Name</Field>
    <Field Name="UserCreatable">TRUE</Field>
    <Field Name="Sortable">TRUE</Field>
    <Field Name="AllowBaseTypeRendering">TRUE</Field>
    <Field Name="Filterable">TRUE</Field>
    <Field Name="FieldTypeClass">CustomFieldTypes.MyCustomField, CustomFieldTypes, Version=1.0.0.0, Culture=neutral, PublicKeyToken=xxxx</Field>
    &

Create Custom Field type as "Primary Key"

  
How to create a custom field type for new Column? It should not allow duplicate entry and NULL values for list or document library column. Check users input against the other values from the same column in the list, to verify is it unique, or not?

This "Primary key" - custom field type must appear while creating field with other column types (like "Single line of text" or "Multiple lines of text" or "Choice" or "Number" or "Currency".. etc)

I am using MOSS 2007

Thanks in advance

Overide GetValidatedString in custom field type

  

Hello!

How i can get access to other fields in item creation form from my custom field type code?

I need to join the value of standard and custom fields.

Thanks for your time.


How do you set the ClassInfo of a user creatable custom field type?

  
I have implemented a custom field type class that is user creatable, and derives from SPComputedField as a base class. This means it gets rendered in a <td class="ms-vb2"> cell in the list. I want to change it to render with the ms-vb-title class. If I were defining a fixed instance of my custom field in a list or content type, then this could be done in the <Field> element of the content type or list definition XML by setting the ClassInfo property.

However, how do I achieve this when the field is user creatable and the user adds an instance of the field to the list through the GUI? Is there a way for custom fields to specify their default class info, or to otherwise override the class of the cell they are rendered within in a view?


Edit: To answer my own question, adding the following to the 3-argument constructor works, but is nasty and unsupported. I'd still like a clean way of achieving this.

public MyCustomField(SPFieldCollection fields, string typeName, string displayName)
            : base(fields, typeName, displayName)
{
  MethodInfo miSetFieldAttributeValue = this.GetType().GetMethod("SetFieldAttributeValue", BindingFlags.Instance | BindingFlags.NonPublic);
  miSetFieldAttributeValue.Invoke(this, new object[] { "ClassInfo", "Menu" });
}

Problem with custom pages using ForeignKey.ascx & ForeignKey_Edit.ascx field templates

  

I have created a DynamicData website with a data model from Northwind (using Orders & Shippers tables Orders.ShipVia-> Shippers.ShipperId) I've turned scaffolding on.

I have then added a custom page by copying ListDetails.aspx from PageTemplate folder to the DynamicData\ CustomPages\Orders folder

Then I have edited the page:

And adding the following to the GridView1:

AutoGenerateColumns="false"

<Columns>
    <asp:DynamicField DataField="OrderID">
    </asp:DynamicField>
    <asp:DynamicField DataField="OrderDate">
    </asp:DynamicField>
    <asp:DynamicField DataField="ShippedDate">
    </asp:DynamicField>
    <asp:DynamicField DataField="ShipVia">

custom field type works in view properties, but not in list view: 3 parent fields filter child list,

  

My situation:

A) odd thing is that no matter where I put a stop point in my custom field type, it is NEVER hit when the items are displayed in list view.  Event with <Field Name="CAMLRendering">TRUE</Field> which causes the list to error out, but again no stop point to help me know why.

B) the value of the column in question will be different for every user who views the list, I'm querying a secondary list based on the user's loginName, and two of the fields from the list we're in. 

C) the display is customized based on whether any records were returned and the current DateTime, so possible displays would be "", "! 12/1/2010", and "7/7/2011"

D) and the text displayed links over to a form for them to do their assignment. the link url would be a config setting url + "?[one of the fields form the list we're in]"

My questions:

1) Is it possible for fieldtype code to execute while a list view is being rendered?

2) If not, then should I chase down the path of a content query webpart?  Will it be able to filter on the current users login name?

3) If not on 1 or 2, can you think of any other way to do this beyond creating a custom application page? (need to having filtering and sorting on this page)


Custom and Folder content type problem

  

Hello,

Does anyone have any idea why some documents in a document library would be added as a Folder content type, whereas others as the default content type of the library???

Examples:

docx added as DefaultContentType

doc as Folder

pdf as DefaultContentType

ppt as Folder


Of all the things I ever lost, I miss my mind the most.

Office Space: Custom Field Types for SharePoint 2007

  

Custom field types provide a powerful way to define a reusable SharePoint column definitions.

Ted Pattison

MSDN Magazine May 2009


Categories: 
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend