.NET     Console.WriteLine( "All Things .NET" );
.NET Nerd Blog Home
5.30.2005

 
ASP.NET -- Add DropDownList in DataGrid Edit Mode
(from "Top Questions about DataGrid Web Server Control")

I know this is easy, but never seem to remember the syntax for the EditItemTemplate stuff.

Top Questions about the DataGrid Web Server Control

Static text for label:
Text='<%# DataBinder.Eval(Container, "DataItem.genre") %>'

DropDownList bound to DataSet:
<asp:DropDownList id=DropDownList4 runat="server"
DataSource="<%# DsBooks1 %>" DataMember="Genre"
DataTextField="genre" DataValueField="genre" Width="160px">




Same article has this snippet about checkboxes in the datagrid, like you'd see in hotmail, etc.


Comments: Post a Comment

Powered by Blogger