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
2
votes
1 answer

LinqDataSource wizard table list is not refreshing after updating LinqToSql classes

I have changed my dbml file like this. I have deleted all the tables and stored procs. I added new tables and stored procs from a new database. In the code-behind, I can access the new tables and stored procs. However, in the LinqDataSource using…
2
votes
2 answers

Ordinal Position of Element in IENumerable Collection (Linq to XMl )

How do I embed the ordinal number of element as its attribute in this linq query. var AllSections = from s in xmlDoc.Descendants("section") select new { id =…
Boris Smirnov
  • 1,217
  • 4
  • 15
  • 27
2
votes
1 answer

How to change this Ext.Net example to use Sql instead of Linq?

I am going by this example and trying to have it use a SqlDataSource instead of LinqDataSource. I can get the data to display in the table, but the form does not fill with the data when I select a row. I think these are the relevant bits of…
Kalina
  • 5,504
  • 16
  • 64
  • 101
1
vote
1 answer

Updating LinqDataSource from separate DataContext

I want to update one LinqDataSource with a record retrieved from a different DataContext. The problem is that the DataContext of the LinqDataSource doesn't seem to be made public so I can't get access to it to attach the new object to the…
Alex
  • 34,776
  • 10
  • 53
  • 68
1
vote
3 answers
1
vote
2 answers

Adding LinqDataSource Where Parameters in Code-Behind

Reading simple table using LinqDataSource. Table name is ZipCode with three columns: ZipCode, City, State). Read works fine with no filter, but when I add "Where" parameters to LinqDataSource, it fails in the GridView databind with an error, "No…
Bob Jones
  • 2,049
  • 5
  • 32
  • 60
1
vote
1 answer

LinqDatasource Where Clause on Field belong to a Linked Table via Foreign Key

I have 2 Tables, Emails and Owners that are linked with a foreign key . Emails has a Column Owner_FID which is a FK to Owner_ID of Owners. I have a Linq Datasource for the Emails Table and i want to filter it using Where On the Owner.Owner_Name…
christosst
  • 93
  • 1
  • 5
1
vote
2 answers

How to regenerate grid data on various button click event of a page while we are using telerik grid with LinqDataSource

I am using Telerik grid control and LinqDataSource control on a page. code : all things working fine now i want to call its protected void…
user845802
1
vote
1 answer

Can you prevent LinqDataSource from setting a property?

I've got a Linq 2 SQL object I'm trying to update. Two of the properties on this object are related to each other, and setting one sets the other. So if I do: Foo.Code = BEER; The Foo.CodeID property will automatically be set to 5 (or…
CodeRedick
  • 7,346
  • 7
  • 46
  • 72
1
vote
1 answer

Fastest way to create DataTable from List without for loop

We have a huge list (say 100,000) which needs to be converted to DataTable for SqlBulkcopy. Can you guide what could be the fastest way to do this without using for loop? For now we are doing it like - in below code listDos is object list using…
Oxygen
  • 831
  • 4
  • 17
  • 42
1
vote
1 answer

LinqDataSource - is default insert parameter with dbnull value possible?

I need to do some simple (or so it seems) databinding and CRUD type operations on an ASP.Net page. I'm using a LinqDataSource connected with a FormView. The table that i'm trying to insert into has default contraints for these fields: [Created]…
James
  • 12,636
  • 12
  • 67
  • 104
1
vote
1 answer

Rebinding GridView using LinqDataSource

I have a gridview that is using a LinqDataSource for it's datasource. I've added a FooterTemplate so users can insert new records. The Add Button has a command name that puts the values in a Dictionary list and then calls the…
Tim Boland
  • 10,127
  • 8
  • 27
  • 25
1
vote
1 answer

LinqDataSource "OnSelecting" event not firing on Post-backs

I have a web page with two dropdownlist controls, each bound to separate LinqDataSource objects. One displays a list of Categories and the other displays a list of Articles. The Category choice drives Article list (at least, that's my intended…
eponymous23
  • 1,088
  • 2
  • 10
  • 24
1
vote
2 answers

Binding LinqDataSource from code-behind to Gridview

i have a grdidview control on the .aspx page and i am trying to connect dynamically from code behind and bind the gridview but somehow it throwing me an error... what is wrong with this code? any help? LinqDataSource LDS_POReport = new…
Nick Kahn
  • 19,652
  • 91
  • 275
  • 406
1
vote
1 answer

Displaying a gridview's footer with an empty (linqdatasource) datasource

The datasource of the datagrid is a LINQDataSource which relies on the value of a dropdownlist. In addition, I want to use the footer to insert new records - so I'd prefer not to use the empty dataset template. I am trying to find a way to always…
Andy Evans
  • 6,997
  • 18
  • 72
  • 118
1 2
3
9 10