15.08.2013 Views

Ektron CMS400.NET Developer Reference Manual

Ektron CMS400.NET Developer Reference Manual

Ektron CMS400.NET Developer Reference Manual

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

NOTE<br />

Introduction to <strong>Ektron</strong> <strong>CMS400.NET</strong> Server Controls<br />

The following are data bindable <strong>Ektron</strong> Server Controls.<br />

• Collection<br />

• Content Block<br />

• Form Block<br />

• List Summary<br />

• Search<br />

The following is an example of code behind that uses a DataGrid to<br />

display a Collection:<br />

Dim myCol As New <strong>Ektron</strong>.Cms.Controls.Collection<br />

myCol.DefaultCollectionID = 1<br />

myCol.Fill()<br />

DataGrid1.DataSource = myCol<br />

DataGrid1.DataBind()<br />

When using drag and drop server controls for the Collection and DataGrid, you<br />

need to call the DataBind() method in the code behind. An example line of code<br />

would be: DataGrid1.DataBind() .<br />

This subsection contains the following topics:<br />

• ”Steps to Data Binding Using Drag and Drop Server Controls”<br />

on page 54<br />

• ”Customizing the DataGrid Table View” on page 57<br />

Steps to Data Binding Using Drag and Drop Server Controls<br />

The following example uses a Collection.<br />

<strong>Ektron</strong> <strong>CMS400.NET</strong> <strong>Developer</strong> <strong>Reference</strong> <strong>Manual</strong>, Version 5.1, Revision 5 54

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!