Questions tagged [linqdatasource]

LinqDataSource is a Web Control which enables the use of Language-Integrated Query (LINQ) in an ASP.NET Web page through markup text to retrieve and modify data from a data object.

LinqDataSource is a Web Control which enables the use of Language-Integrated Query (LINQ) in an ASP.NET Web page through markup text to retrieve and modify data from a data object.

141 questions
1
vote
2 answers

Using a LinqDataSource to delete from Gridview

Got a gridview bound to a LinqDataSource which is getting its data from a MsSQL database view. This view is pulling in various tables to produce the list I want. This is all working fine. However, I cannot delete, when I try and use delete I get…
Martin
  • 240
  • 4
  • 13
1
vote
2 answers

Iterating over objects returned by Linqdatasource

I have a GridView, with filtering and pagination (10 at a time), bound to a Linqdatasource. All this works. But how can I get the Ids of all the data retrieved in the LinqDataSource after it has finished retrieval of all rows? I have this method,…
Ash Machine
  • 9,601
  • 11
  • 45
  • 52
1
vote
2 answers

How can I get the IQueryable object used by LinqDataSource?

Is there a way to get the IQueryable object that the LinqDataSource has used to retrieve data? I thought that it might be possible from the selected event, but it doesn't appear to be. Each row in my table has a category field, and I want to…
Spectre87
  • 2,374
  • 1
  • 24
  • 37
1
vote
1 answer

LinqDataSource query help

I know LINQ doesn't have the SQL IN clause but rather uses "contains". Can I use this on a LinqDataSource? I want to write a simple query that is equivelent to this: SELECT * FROM tableA WHERE tableA.requestType NOT IN (5,6,7,8)…
Hcabnettek
  • 12,678
  • 38
  • 124
  • 190
0
votes
2 answers

How to show headings in GridView with no results

What is the best way to still show column headings on a GridView that doesn't get any records when using LINQDataSource?
Brian David Berman
  • 7,514
  • 26
  • 77
  • 144
0
votes
1 answer

Read data from txt files - using Linq-Entities?

in my current ASP.net MVC 3.0 project i am stuck with a situation. I have four .txt files each has approximatly 100k rows of records These files will be replaced with new files on weekly bases. I need to Query data from these four text files, I am…
HaBo
  • 13,999
  • 36
  • 114
  • 206
0
votes
1 answer

Row Order error when populating Report Viewer control bound to LinqDataSource

I have an Availability Report Viewer control bound to a LinqDataSource:
Ash Machine
  • 9,601
  • 11
  • 45
  • 52
0
votes
1 answer

LinqDataSource: How to assign values to where parameters in code?

I have the following WhereParameters for LinqDataSource1 in my .aspx file: How do I assign values to these…
user776676
  • 4,265
  • 13
  • 58
  • 77
0
votes
1 answer

LINQ: What is the LinqDataSource equivalent of "adapter.Fill(ds)"?

I am trying to use LinqDataSource instead of using the SQL dataset. Currently, if I want to update my GridView, I just declare a DataSet ds = new DataSet(); then I adapter.Fill(ds); GridView.DataSource = ds; GridView.DataBind(); What is the…
user776676
  • 4,265
  • 13
  • 58
  • 77
0
votes
2 answers

Can't get LinqDataSource to recognize deatil relations

what I have are two tables, Publication and DTPersonnel. Publication has a primary Key and the other (DTPersonnel) has a field that is link back Publication. I sent up a DBML layout for my LinqDataSource and link the two tables.. I have added the…
Mike
  • 1,221
  • 3
  • 15
  • 34
0
votes
0 answers

Can a query hint be added to a LinqDataSource

Legacy ASP.NET application uses a LinqDataSource to populate a GridView, but querying the SQL Server view is slow unless OPTION (USE HINT ('FORCE_LEGACY_CARDINALITY_ESTIMATION')) is added to the query.
Jonny
  • 1,037
  • 7
  • 15
0
votes
1 answer

LinqDataSource class example

Just starting to look into using LinqDataSource for a GridView and I’m looking for a few more examples on how to set up my data source. I am hoping later on to use it against a SharePoint List but for now I’m simply after some detailed examples for…
Ches
  • 5
  • 1
  • 6
0
votes
2 answers

Single web page, LinqDataSource, GridView to edit multiple data tables

Problem is - new application, customer wants Linq, .NET 4.0, many data tables that are "categories" and "types" - simple data tables that are usually two fields: ID and Name (or description) Instead of generating a web form to edit each of these…
Bubba
  • 192
  • 1
  • 3
  • 14
0
votes
2 answers
0
votes
1 answer