-1

I want to know the purpose of list view iterator and need to use in my current project.will u please brief on this. I have some 20 fields in visual webpart by using asp.net controls but as per the requirement I need to change those controls with list field iterator control instead of asp.net.may I know how to use and the use of the control briefly ASAP. thank u in before

1 Answers1

2

Listfielditerator control renders each field in a list item with an appropriate control. A single line text field will be rendered as a text box while a lookup field will be rendered as combo box. This control resides in the Microsoft.SharePoint.WebControls namespace of the Microsoft.SharePoint.dll.

You can use this control in a custom application page or in a custom Edit, New and Display form.

In its simplest way you can declare the control as follows:

<spuc:ListFieldIterator ID="TestListFieldIterator" runat="server"
                        ControlMode="Edit" ListId="{e2886b6e-4d63-4063-a02c-eac7fb3aef79}" />

So you need to declare your own controls as it will automatically renders your data in list according to its type.

For more details: http://karinebosch.wordpress.com/sharepoint-controls/listfielditerator/

http://www.ilikesharepoint.de/2014/03/what-is-a-listfielditerator-and-how-can-i-customize-sharepoint-listforms/

Aanchal
  • 7,885
  • 1
  • 15
  • 20
  • is it possible to use this control for custom controls developed in visual webpart – chiranjeevi Avala Jun 23 '14 at 06:29
  • You can check http://social.msdn.microsoft.com/Forums/en-US/405a0d32-817e-48e0-bd5e-a44f14d71fe9/how-to-create-a-custom-form-using-listfielditerator-control – Aanchal Jun 23 '14 at 06:32