I think the DevX grid has issues really, I took the sample that was sent to me but it was bound to another version of DevX. So I copied the code basically out of the aspx and code behind and it works, however, they do not seem to play well with DataSourceControls in design mode.
Here is the code, it does show data, but I hand coded it:
Code:
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default2.aspx.cs" Inherits="Default2" %>
<%@ Register Assembly="DevExpress.Web.ASPxGridView.v7.2, Version=7.2.4.0, Culture=neutral, PublicKeyToken=9b171c9fd64da1d1"
Namespace="DevExpress.Web.ASPxGridView" TagPrefix="dxwgv" %>
<%@ Register Assembly="DevExpress.Web.ASPxEditors.v7.2, Version=7.2.4.0, Culture=neutral, PublicKeyToken=9b171c9fd64da1d1"
Namespace="DevExpress.Web.ASPxEditors" TagPrefix="dxe" %>
<%@ Register Assembly="EntitySpaces.Web" Namespace="EntitySpaces.Web" TagPrefix="cc1" %>
<!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>Untitled Page</title>
</head>
<body>
<form id="form1" runat="server">
<div>
<dxwgv:ASPxGridView ID="ASPxGridView1" runat="server" AutoGenerateColumns="False" DataSourceID="EsDataSource1" KeyFieldName="EmployeeID">
<Columns>
<dxwgv:GridViewDataTextColumn FieldName="EmployeeID" ReadOnly="True" VisibleIndex="0">
<EditFormSettings Visible="False" />
</dxwgv:GridViewDataTextColumn>
<dxwgv:GridViewDataTextColumn FieldName="LastName" VisibleIndex="1">
</dxwgv:GridViewDataTextColumn>
<dxwgv:GridViewDataTextColumn FieldName="FirstName" VisibleIndex="2">
</dxwgv:GridViewDataTextColumn>
</Columns>
</dxwgv:ASPxGridView>
<br />
<cc1:esDataSource ID="EsDataSource1" runat="server" OnesSelect="EsDataSource1_esSelect" />
</div>
</form>
</body>
</html>
Code:
using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using BusinessObjects;
public partial class Default2 : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
}
protected void EsDataSource1_esSelect(object sender, EntitySpaces.Web.esDataSourceSelectEventArgs e)
{
EmployeesCollection coll = new EmployeesCollection();
coll.LoadAll();
// Assign the esDataSourcSelectEvenArgs Collection property
e.Collection = coll;
}
}
EntitySpaces |
Twitter |
BLOG | Please honor our Software License