473,385 Members | 1,901 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Linq problem in GridView (related field)

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.

Aug 12 '08 #1
0 1117

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Carlos Albert | last post by:
Hello everybody I'm working (or trying to, at least) with a gridview within another gridview, and the 'child' gridview is related with the 'parent' from a field. With a simple gridview I used...
5
by: sutphinwb | last post by:
Hi - This could be a simple question. When I relate two tables in a datasetet, how do I get that relation to show up in a GridView? The only way I've done it, is to create a separate table in the...
2
by: MRW | last post by:
Hello! I don't know if this is possible, but I have two tables in a one-to-many relationship. I want one record to be displayed in a GridView from table1 with a blue background, followed by all...
2
by: Riaaaa | last post by:
I m beginner for ASP.Net 2005 with C# and SQL Server 2005. I have created the form which contains many asp standard controls on it like label,textbox,checkbox,dropdownlist,command button. The...
1
by: savajx1 | last post by:
I need to dynamically create a set of bound fields contained in a GridView control. I also have a single static CommandField that I can declare in the Columns <tagof the GridView control. I have...
1
by: webby98 | last post by:
I have an issues using LINQ and nested gridview. Let me explain, Gridview A are the for grouping. And Gridview B are place in between Gridview A to display list data relate to Gridview A...
13
by: SAL | last post by:
Hello, I'm trying to include a popup in the ItemTemplate of a gridview row. The ItemTemplate for the field contains a textbox and when the user clicks in the textbox I want a popup panel to show...
0
by: bob | last post by:
Hi Arne, Check out the ObjectDataSouce. Get the feeling that the output of your LINQ query could be bound to it. Something like LINQ -IEnumerable<T-ObjectDataSource Bind the Datagrid to the...
2
by: syedfasih | last post by:
Hi, I am Syed Fasih ---this is my aspx.cs file for the page navigation. protected void grdConsultation_PageIndexChanging(object sender, GridViewPageEventArgs e) { ...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.