GridView With DropDownList

 

Occasionally you need to add a dashboard control to Umbraco. This is required when you have content that has a complex structure. Or perhaps you need to directly query a database table of content in a way that XSLT doesn’t allow.

The project below is simply an ASP.NET website that contains a GridView in a UserControl that edits a Contacts table. One of the fields is a DropDownList that is linked to another table with a foreign key.

Here’s how to use it:

1. Create a SQL database.

2. Unzip the files.

3. Change the connection string on line 13 of ContactsControl.ascx.cs.

4. Run the file script.sql to create the database tables.

5. Run the project to view the grid. You should see something like the below.

 

Files:

/media/1078/gridview.zip
Share