My gird is declared like so:
...and I bind to a generic list in the codebehind...
My list ("Users") is a list of objects with the following definition:
There are two users in my source data. The grid displays the right number of rows, but the cells are empty:
Empty Grid
I'm sure this is an obvious mistake. Any help is appreciated.
<%@ Page Language="VB" AutoEventWireup="false" CodeFile="list.aspx.vb" Inherits="User_list" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<
html
xmlns
=
"http://www.w3.org/1999/xhtml"
>
<
head
runat
=
"server"
>
<
title
></
title
>
</
head
>
<
body
>
<
form
id
=
"form1"
runat
=
"server"
>
<
telerik:RadScriptManager
ID
=
"RadScriptManager1"
Runat
=
"server"
></
telerik:RadScriptManager
>
<
telerik:RadGrid
ID
=
"UserGrid"
runat
=
"server"
AutoGenerateColumns
=
"False"
CellSpacing
=
"0"
GridLines
=
"None"
runat
=
"server"
>
<
MasterTableView
>
<
Columns
>
<
telerik:GridBoundColumn
AllowFiltering
=
"False"
DataField
=
"EmailAddress"
FilterControlAltText
=
"Filter column column"
HeaderText
=
"User"
UniqueName
=
"column"
>
</
telerik:GridBoundColumn
>
<
telerik:GridBoundColumn
DataField
=
"FullName"
FilterControlAltText
=
"Filter column1 column"
HeaderText
=
"Full Name"
UniqueName
=
"column1"
>
</
telerik:GridBoundColumn
>
</
Columns
>
</
MasterTableView
>
</
telerik:RadGrid
>
</
form
>
</
body
>
</
html
>
...and I bind to a generic list in the codebehind...
Protected
Sub
Page_Load(sender
As
Object
, e
As
System.EventArgs)
Handles
Me
.Load
If
Not
Page.IsPostBack
Then
Dim
Users
As
List(Of User) = UserManager.GetAll(ApplicationVariables.CurrentUser.InstitutionId)
UserGrid.DataSource = Users
UserGrid.DataBind()
End
If
End
Sub
My list ("Users") is a list of objects with the following definition:
Public
Class
User
Public
UserId
As
Integer
= 0
Public
Password
As
String
=
String
.Empty
Public
EmailAddress
As
String
=
String
.Empty
Public
InstitutionId
As
Integer
= 0
Public
FullName
As
String
=
String
.Empty
End
Class
There are two users in my source data. The grid displays the right number of rows, but the cells are empty:
Empty Grid
I'm sure this is an obvious mistake. Any help is appreciated.