views:

131

answers:

1

Hi friends

I have created custom site column with type text and I included in one of content types. But it is allowing me for 255 characters only. In which way I can extend it, say 1024 characters. I did this before by mentioning somewhere in web.config file but I forgot how i did.

Can anyone please tell me how can I achieve this. Thanks in advance.

+2  A: 

Just use column type note and you will have more space. Looks like this is issue that SPFieldText won't allow more than 255 chars, althought it has MaxLength property, it anyway won't allow more chars.

You may read this article on how to create your custom column that can be used to type in more than 255 chars.

Janis Veinbergs
Janis Thank you for your reply Yeah I tried note data type. but still it is allowing me 255 characters only. Here how I did this in the visual studio 20081. Created site column(mycolumn) with type note.2. created content type with mycolumn with other site columns.3. Created page layout(.aspx) with this content type4. When I publish the page layout by entering >255 characters, It is hindering me saying "This field can have no more than 255 characters."I believe I approached in right way. I am not sure where I did the wrong.I appreciate your reply
alienavatar
See edited answer :)
Janis Veinbergs
Thanks Jenis, I followed the article and created custom field type by selecting custom field type(which comes with wsp builder) but when I see the fldtypes.xml there is no default sqltype field. Is that ok to include the <Field Name=”SQLType”>ntext</Field> exclusively.And do we neeed any custom code to accomplish this particular requirement. I appreciate your quick replies.
alienavatar