The people.aspx page host the UserInfo list as in the following line
<SharePoint:ListView id="UserListView" ListID="UserInfo" runat="server"/>
and the schema for the users list is defined in the schema.xml file in the <12hive>\TEMPLATE\GLOBAL\Lists\USERS folder. The checkbox is implemented as a Computed type column as follows.
<Field ID="{625e82b6-fb2b-4c37-9a45-ba7541f8d139}" Type="Computed" ReadOnly="TRUE" Name="UserSelection" DisplayName="$Resources:userinfo_schema_selectionbox;" Sortable="FALSE" Filterable="FALSE" EnableLookup="FALSE" HeaderImage="unchecka.gif" ClassInfo="Icon" AuthoringInfo="$Resources:userinfo_schema_selectionbox_editinfo;" SourceID="http://schemas.microsoft.com/sharepoint/v3" StaticName="UserSelection">
<FieldRefs>
<FieldRef Name="ID" />
<FieldRef Name="Name" />
<FieldRef Name="EMail" />
<FieldRef Name="SipAddress" />
<FieldRef Name="Title" />
</FieldRefs>
<DisplayPattern><HTML><![CDATA[<input type="checkbox" name="spUserSelectionCheckBox_]]></HTML>
<Counter Type="View" /><HTML><![CDATA[" id="spUserSelCb_]]></HTML>
<Counter Type="View" />
<Column Name="ID" /><HTML><![CDATA[" ]]></HTML><HTML><![CDATA[value="]]></HTML>
<Column Name="ID" HTMLEncode="TRUE" /><HTML><![CDATA[" account="]]></HTML>
<Column Name="Name" HTMLEncode="TRUE" /><HTML><![CDATA[" email="]]></HTML>
<Column Name="EMail" HTMLEncode="TRUE" /><HTML><![CDATA[" ]]></HTML><HTML><![CDATA[sip="]]></HTML>
<Column Name="SipAddress" HTMLEncode="TRUE" /><HTML><![CDATA[" ]]></HTML><HTML><![CDATA[onclick="UserSelectionOnClick(this,']]></HTML>
<Counter Type="View" /><HTML><![CDATA[');" ]]></HTML><HTML><![CDATA[title="]]></HTML>
<Column Name="Title" HTMLEncode="TRUE" /><HTML><![CDATA["/> ]]></HTML>
</DisplayPattern>
</Field>
The
If you have list definition for your custom list you can directly go and modify the schema. When you don’t have schema but you want to achieve the checkbox in your custom list, this where comes the handy AddFieldAsXml of SpFieldCollection type.
<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. You are done.
Cheers,
Murugan G.