How to get the field of list item of sharepoint in ListView

Hi All…. This the code which get the fields of listitems in columns of ListView….. Check it out… It will also add ID of all items in Listivew’s first column……

For Each splist In spsite.OpenWeb.Lists

If (splist.Title = TvSites.SelectedNode.Text) Then

For Each SPField In splist.Fields


‘i = i + 1


If (splist.Items.Count > 0) Then

For Each splistitem In splist.Items





"No Items in Selected List", "Information", MessageBoxButtons.OK, MessageBoxIcon.Information)

End If

End If


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

<span>%d</span> bloggers like this: