Linq problem in GridView (related field)

R

Raynald

Hi everybody,

I have a problem on linq related field, look my simple example :

<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs"
Inherits="_Default" %>

<!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>
<asp:GridView runat="server" ID="GridView1"
DataSourceID="LinqDataSource1" AutoGenerateColumns="false"
AllowPaging="true">
<Columns>
<asp:BoundField DataField="ProductID" HeaderText="ProductID"
ReadOnly="True" SortExpression="ProductID">
</asp:BoundField>
<asp:BoundField DataField="ProductName"
HeaderText="ProductName" SortExpression="ProductName">
</asp:BoundField>
<asp:TemplateField HeaderText="CategoryName">
<ItemTemplate>
<%#Eval("Category.CategoryName")%>
</ItemTemplate>
</asp:TemplateField>
</Columns>
</asp:GridView>
</div>
<asp:LinqDataSource ID="LinqDataSource1" runat="server"
ContextTypeName="NorthwindDataContext"
TableName="Products">
</asp:LinqDataSource>
</form>
</body>
</html>


Usually, we can expect the category name appear in our gridview but not.
We suspect a platform or/and os configuration because on US Windows XP and
VS 2008, it's work, but in French XP and VS not. The problem is the same on
our production server (IIS on windows 2003 R2 in french).
If we use Linq in C# for any query, it is ok.

Anybody have an idea on this problem ?

Thanks for all.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
474,001
Messages
2,570,250
Members
46,848
Latest member
Graciela Mitchell

Latest Threads

Top