Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6239103
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T11:20:09+00:00 2026-05-24T11:20:09+00:00

I’m working on a WSS 3 site that has a ListViewWebpart displaying various columns.

  • 0

I’m working on a WSS 3 site that has a ListViewWebpart displaying various columns.

I need to add a checkbox to each row and a button to the header that will perform a server side action for the selected rows.

Do I need to make my own custom webpart or can the ListViewWebpart support checkboxes?

Adding checkboxes to each row

I’ve found a post Checkbox in ListViewWebpart which suggests

…to add a checkbox, to select multiple
listitem, in the custom list, declare
a xml string as follows.

<Field Type="Computed" ReadOnly="TRUE" Name="ListItemSelection" DisplayName="Select" Sortable="FALSE" Filterable="FALSE" EnableLookup="FALSE" SourceID="http://schemas.microsoft.com/sharepoint/v3" StaticName="ListItemSelection">
<FieldRefs>
<FieldRef Name="ID" />
</FieldRefs>
<DisplayPattern>
<HTML><![CDATA[<input type="checkbox" ]]></HTML>
<HTML><![CDATA[LItemId="]]></HTML>
<Column Name="ID" HTMLEncode="TRUE" />
<HTML><![CDATA["/> ]]></HTML>
</DisplayPattern>
</Field>

and call the
list.Fields.AddFieldAsXml(“xml
string”);. Include this as a first
column in your custom list’s view.

I’m assuming the latter part requires a SPList. E.g.

SPList list = SPContext.Current.Web.Lists["MyList"];
list.Fields.AddFieldAsXml(stringWithXmlFieldDefinition);

Adding a button to the header row

One option for the header button is a CustomAction. This should create a button in the toolbar.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-24T11:20:10+00:00Added an answer on May 24, 2026 at 11:20 am

    Here is a post to create a custom web part, then you can add a check box to your custom web part using the post you have found (Checkbox in ListViewWebpart).

    Be aware that,list.Fields.AddFieldAsXml(stringWithXmlFieldDefinition); can end up adding many duplicated check boxes to you sharepoint. The duplicated can be deleted from database and are located at AllLists table, tp_Fields column.

    To find the right fields, you can search by the list guid.

    declare @xmlString as xml
    Select  @xmlString = tp_Fields
    From        [WSS_Content].[dbo].[AllLists]
    Where   tp_id ='xxxx'
    Select @xmlString
    

    then, update the fields

    declare @string as varchar(max)
    set @string ='new value without duplicated checkbox'
    UPDATE [WSS Content] . [dbo] . [AlILists)
    SET [tp_Fields] = @string
    WHERE tp_ID = 'xxx'
    

    You can simply add a button by

    ToolBarButton newbtn = (ToolBarButton)Page.LoadControl("~/_CONTROLTEMPLATES/ToolBarButton.ascx");
    

    but possibly you need create another toolbar to hold the button, you can even create your own toolbar. You just need to put it in C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\TEMPLATE\CONTROLTEMPLATES\YourCutomToolBar.ascx

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this
That's pretty much it. I'm using Nokogiri to scrape a web page what has
Basically, what I'm trying to create is a page of div tags, each has
I've got a string that has curly quotes in it. I'd like to replace
I have a French site that I want to parse, but am running into
I need to clean up various Word 'smart' characters in user input, including but
I need a function that will clean a strings' special characters. I do NOT
I'm working with an upstream system that sometimes sends me text destined for HTML/XML
In my XML file chapters tag has more chapter tag.i need to display chapters
link Im having trouble converting the html entites into html characters, (&# 8217;) i

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.