Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

I created a BDC list. When I create a new item, I have to type in all the neccessary columns.

I want to make two of the columns radiobutton choice and dropdown list.

I can't create new columns for these types. I think I have to modify the TypeDescriptors through .bdcm but I don't know how to.

Answer:

I modify my NewForm with SharepointDesigner after deploy the BDC.

I put this jquery into the PlaceHolderAdditionalPageHead.

    <script type="text/javascript">
    $(document).ready(function()
{
    $("input[title='KadroTipi']").attr("style","display:none;");//.parent().append('<select><option value="idari" selected="selected">İdari</option><option value="doktor">Doktor</option></select>');
     $('<select><option value="idari" selected="selected">İdari</option><option value="doktor">Doktor</option></select>').insertBefore("input[title='KadroTipi']")
}); 
    </script>
share|improve this question
add comment

1 Answer

up vote 1 down vote accepted

On SE here is something regarding the TypeDescriptor, but I do not think that this is the way for changing the BDC List Column Type. However, I don't know the way to edit it in this way, so I've upvoted your question.

There is a similar question on SE here. One of the proposed answers was a link to the SPCascadeDropdowns function in SPServices on codeplex. It gave me an idea to create a Javascript to show the items as a dropdown list. Following is a procedure for doing this with jQuery.

You should follow the procedure on your link to Tobias Zimmergren's blog with the topic Customizing the forms for External Lists (BCS) in SharePoint 2010 by using Custom Field Controls and jQuery. He suggests that it is not recommended to edit the BDC Model via Visual Studio, but via XML so here are the steps to edit it via SP Designer shown on Prachi Sarnot's blog:

  1. Select the External Content Types in left navigation pane in SharePoint Designer 2010.
  2. Select the ECT which you want to export and click Export BDC Model in the ribbon.
  3. In the Export BDC Model box, specify the BDC Model Name (eg. CustomerDetails) and click OK.
  4. Change the Save as type to All Files in the File Save dialog box.
  5. Choose a destination folder for the file and change the File Name box to "CustomerDetails.xml".
  6. Click Save.
  7. Edit the XML file like on Tobias' blog.
  8. Navigate to the Business Data Connectivity Service configuration in the Central Administration.
  9. Click Import in the BDC Models tab in the ribbon. Note: The same BDC Model should not already exist in the store.
  10. Click the Import button. You may see one or two warnings, but there should be no errors.
  11. Click OK.
  12. Proceed with the instructions on Tobias' blog on how to put the jQuery.

I really hope that this helps you. It is a shame however, that this cannot be done through SP itself. Maybe in some new version of SP this will be implemented. If someone else finds a better way on doing this, please post it :)

share|improve this answer
1  
Yes, JS will be helpful I think. I'll try this: zimmergren.net/misc/… I will write here, when it works. –  e.ozmen May 20 '13 at 10:22
    
I couldn't find where to do it in the BDC Project. Should I create a new .cs, create a new type and select the class as the type of the column from bdcm? –  e.ozmen May 21 '13 at 20:46
    
I've edited my answer. Please try it out and write if it worked :) –  dzookatz May 22 '13 at 8:05
    
I'm at the step 12. And didn't understand too much from the blog.:/ It's too complicated ,doesn't explain too much. –  e.ozmen May 22 '13 at 11:53
1  
It' pretty straightforward, do you have experience with XML and jQuery? What part is too complicated? If you want to set dropdown and a checkbox for inserting items to BDC, you can use steps 1-12, and if you want to display them in a view, you can use the rest of Tobias' blog. Also, you could try to do it with SPServices, a link is in the codeplex link in my answer. You have an example on how to set it up on that site. –  dzookatz May 22 '13 at 14:33
show 5 more comments

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.