Archive

Archive for the ‘WebParts’ Category

DataGrid to a SharePoint Web Part (with Sortable Columns)

December 30th, 2008 No comments
Google Buzz

1. Add the DataGrid to the Controls collection

protected override void CreateChildControls()

{

dgEmployees = new DataGrid();

dgEmployees.EnableViewState=true;

dgEmployees.AutoGenerateColumns=false;

Read more…

Categories: Moss, WebParts Tags:

DataGrid Pagination in Webparts

December 30th, 2008 No comments
Google Buzz

Step 1: Set up your CreateChildControls

protected override void CreateChildControls()
{
dGrid = new DataGrid();
// write code to set up the data grid
// with your columns etc.

dGrid .PageIndexChanged +=new DataGridPageChangedEventHandler(dGrid _PageIndexChanged);

base.Controls.Add(dGrid);
base.CreateChildControls();

Read more…

Categories: WebParts Tags: