Home
Get Started
Learn
Downloads
AJAX
MVC
Community
Wiki
Forums
Sign in
|
Join
Home
›
ASP.NET Forums
›
Search
Search
You searched for the word(s): userid:645188
More Search Options
RSS Available
Matching Posts
Re: Issue with LINQ when trying to update rows inside a GridView
Hi, myInfoList list can contain multiple items that are retrieved there by ID, that's why I cant use SingleOrDefault in this case. Also, that's the reason I need to use foreach loop to go through the items. And since I'm having a GridView I need to loop through GridView rows too. So there are currently two foreach loops (nested). Do you think this is causing problems?
Posted to
Data Access and ObjectDataSource Control
(Forum)
by
k000der
on 10/6/2009
Re: Issue with LINQ when trying to update rows inside a GridView
Ok, now I can see your point. It gets a bit confusing at times especially when you are dealing with two nested loops and several objects. Thanks :)
Posted to
Data Access and ObjectDataSource Control
(Forum)
by
k000der
on 10/6/2009
Re: Issue with LINQ when trying to update rows inside a GridView
Anyone, could you please help?
Posted to
Data Access and ObjectDataSource Control
(Forum)
by
k000der
on 10/1/2009
Re: Unable to update multiple rows to database with LINQ
Anyone, please? Has anyone managed to do a multiple row update with foreach loop?
Posted to
Data Access and ObjectDataSource Control
(Forum)
by
k000der
on 9/30/2009
Re: Populate checked/unchecked values from db to Checkboxes inside GridView
Thanks for your answers. I got it now :)
Posted to
Data Presentation Controls
(Forum)
by
k000der
on 9/30/2009
Re: Unable to update multiple rows to database with LINQ
OK, I think I got it now. There is nothing wrong with the foreach loop, it's has something to do with the GridView's foreach loop this code is inside of. Let me post another topic on this issue.
Posted to
Data Access and ObjectDataSource Control
(Forum)
by
k000der
on 9/30/2009
Issue with LINQ when trying to update rows inside a GridView
My case is the following: I have a GridView with checkboxes and I want to be able to update checked/unchecked values back to database based on user selections. I'm able to insert new values to database, but haven't been able to do this when updating. Few things to note: - I'm trying to achieve this whenever a button is clicked - DataContext (myContext) is already created outside of the button event handler - IsChecked is a field in MyTable table - I have tried to place SubmitChanges to
Posted to
Data Access and ObjectDataSource Control
(Forum)
by
k000der
on 9/30/2009
Unable to update multiple rows to database with LINQ
My code looks like this: ASPX.CS: var myList = myContext.GetInfoByID(id); foreach (MyTable u in myList) { u.IsChecked = false; u.UpdateBy = Page.User.Identity.Name; u.UpdateDate = DateTime.UtcNow; } myContext.SubmitChanges(); DAL: public IEnumerable<MyTable> GetInfoByID(int id) { return from l in this.MyTables where l.ID == id select l; } I'm activating my UPDATE operation inside button click and a) unable to update values back to db b) unable to see what kind of SQL is generated by LINQ
Posted to
Data Access and ObjectDataSource Control
(Forum)
by
k000der
on 9/29/2009
Re: Unable to update multiple rows to database with LINQ
Looks very confusing comparing to what ScottGu explained: http://weblogs.asp.net/scottgu/archive/2007/07/11/linq-to-sql-part-4-updating-our-database.aspx And the same question remains: why my code doesn't work?
Posted to
Data Access and ObjectDataSource Control
(Forum)
by
k000der
on 9/29/2009
Populate checked/unchecked values from db to Checkboxes inside GridView
How can I achieve that? What GridView event should I use? Could you please provide me examples how to do it?
Posted to
Data Presentation Controls
(Forum)
by
k000der
on 9/29/2009
Page 1 of 21 (206 items) 1
2
3
4
5
Next >
...
Last »
Channel 10:
LG eXpo WinMo 6.5 Unboxing Video
Channel 9:
ADFS 2.0 RC is Here!
Channel 10:
Bing Reference Updated with New Sidebar Features
Channel 10:
Look Behind SurfaceScapes
ASP.NET:
Moving your ASP.NET Application to Windows Azure – Part I
TechNet Edge:
Windows Server 2008 R2 Quick Look- Installing the Migration Tools
WindowsClient:
My latest videos – WPF, Silverlight, Sensors, and PDC09
WindowsClient:
Developing an installer for your Surface application
ASP.NET:
Visual Studio 2010 and .NET 4 Update
WindowsClient:
Microsoft’s product placements in The Big Bang Theory
Channel 9:
Channel 9 Live at PDC09: Martin Cron
Channel 9:
Channel 9 Live at PDC09: Erik Meijer and Thomas Lewis
WindowsClient:
Download Data Services Update for .NET 3.5 SP1
Silverlight:
Extending the SMF for the HVP
Silverlight:
Extending the SMF for the HVP
Channel 9:
C9 Lectures: Dr. Erik Meijer - Functional Programming Fundamentals Chapter 12 of 13
Channel 10:
Bing Maps Update: Map Embeds and Draggable Routes
WindowsClient:
New WPF Showcase: WEB Touch
ASP.NET:
ASP.NET MVC 2 RC Released
WindowsClient:
Very exciting Microsoft Pivot from Live Labs
Microsoft Communities
ASP.NET
Channel 8
Channel 9
Channel 10
IIS.NET
Silverlight
TechNet Edge
WindowsClient
Mix Online