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:683319
More Search Options
RSS Available
Matching Posts
Re: DuplicateKeyException when trying to delete a record with a GridView/LinqDataSource
Yes, LinqDataSource was updated in VS 2008 SP1 to use a separate context instance for Update, Insert and Delete. A new context instance is created and disposed of within the scope of these operations. The context for Select will be kept alive until Unload is called on the data source in order to support deferred query execution. Also, you should only associate the LinqDataSource with a single DataBoundControl since it is saving original values from the last Select operation. There's nothing wrong
Posted to
Data Access and ObjectDataSource Control
(Forum)
by
chenriks
on 10/3/2008
Re: Mass delete (with checkboxes / delete all link)
The DataSource Delete, Insert and Update methods only support operating on a single row at a time. The IDictionary arguments should take string column names as the keys and column values as the values. You will need to do some custom logic in order to delete multiple rows at a time. You can do this be handling the DataBoundControl's OnRowDeleting or OnItemDeleting event and setting e.Cancel=true when you have completed the operation (so that the data source doesn't perform the delete). Alternatively
Posted to
ASP.NET Dynamic Data
(Forum)
by
chenriks
on 9/2/2008
Re: How to validate input in gridview in edit mode for Boundfields
BoundField does not create validators. You will need to either use a TemplateField or create your own custom DataControlField that does what you need.
Posted to
Data Presentation Controls
(Forum)
by
chenriks
on 5/30/2008
Re: Problems Paging with ListView control and DataPager (ASP.NET 3.5)
What point in the lifecycle are you doing the programmatic databind (in what handler)? Are you doing it on both the initial request and postbacks? When you page, does it seem like the paging event is always one request behind (i.e., it takes 2 clicks to really move to the next page, etc.)? It could be that your programmatic databind is conflicting with the setting of page properties on postback, causing the new page properties to not get used until the next postback. To test this, you can probably
Posted to
Data Presentation Controls
(Forum)
by
chenriks
on 5/30/2008
Re: Error - DetailsView, EditItemTemplate, Calendar control
To replace the nulls with default values, you'll either need to do it from the database or in the page. From the page you can either check for null inline or handle the DayRender event and do your replacement there. Take a look at this post: http://forums.asp.net/p/1250478/2310983.aspx
Posted to
Data Presentation Controls
(Forum)
by
chenriks
on 5/29/2008
Re: Formatting data from database
It sounds like you just want to perform a GroupBy to group the books by the category. This will give you a set of groups such as: Group = { Category, List<Books> } If you are using ASP.NET data controls (which don't support multidimensional data), you will need to nest the data controls in order to display the inner list of books. For instance, you could use a Repeater that is bound to the datasource, then nest an inner Repeater that binds to the "Container.DataItem". See the
Posted to
Data Presentation Controls
(Forum)
by
chenriks
on 5/28/2008
Re: Creating a child entity before the parent
1. As soon as SubmitChanges for Insert returns successfully you will have access to the PK for the new row from the data object. The LinqDataSource and EntityDataSource both provide an Inserted event that exposes this data object through the event args (look at the Result object). 2. Redirect to the Insert page for Requests and pass the new Requester PK in through the query string. You could do the redirect in the Inserted event for the datasource or databound control, checking to make sure that
Posted to
ASP.NET Dynamic Data
(Forum)
by
chenriks
on 5/28/2008
Re: Update function: why SQL Server update an empty string with 0?
As mentioned, the blank fields will have an initial value of empty string. BoundFields (GridView columns or DetailsView fields), ListView and DataSource parameters also have a ConvertEmptyStringToNull property which determines whether these empty strings should be converted into null values. Usually the default for this is true, which is why you're getting a null value instead of an empty string. If you don't want these empty values included in the updates you will need to remove them before
Posted to
SQL Server, SQL Server Express, and SqlDataSource Control
(Forum)
by
chenriks
on 5/15/2008
Re: Gridview with EditItemTemplate using Linq problem
Use the RowUpdating event instead of RowCommand. The event args will give you access to the keys, new values and old values dictionaries where you can include the document path.
Posted to
Data Presentation Controls
(Forum)
by
chenriks
on 5/12/2008
Re: Simple LINQ & GridView Question - how to edit data?
To make the GridView editable, you need to have a CommandField in the Fields set, that is configured to generate Update and/or Delete buttons. There are properties on GridView that will allow you to automatically generate this command field.
Posted to
Data Access and ObjectDataSource Control
(Forum)
by
chenriks
on 5/12/2008
Page 1 of 5 (50 items) 1
2
3
4
5
Next >
WindowsClient:
Build WPF Data Controls for Outlook Addins Easily with VS2010
Channel 9:
Channel 9 Live at PDC09: .Net Rocks Part 2
Channel 9:
Channel 9 Live at PDC09: .Net Rocks Part 1
Channel 9:
Channel 9 Live at PDC09: Wei Zhu (Facebook)
WindowsClient:
WPF Manipulation Basics
ASP.NET:
High CPU in .NET app using a static Generic.Dictionary
TechNet Edge:
Deploying Silverlight - Why and How
WindowsClient:
Windows Client Developer Roundup for 12/21/2009
Silverlight:
4 Calendars & Plans for 2010 / 5770
ASP.NET:
ASP.NET MVC 2 and Visual Studio 2010
ASP.NET:
Moving your ASP.NET Application to Windows Azure – Part II
Silverlight:
HVP – Core Scaffolding and Updated News
Channel 9:
TWC9: 2009 - The Year in Review
ASP.NET:
Tip#100: Did you know… How to view ASP.NET trace information?
ASP.NET:
Passing anonymous objects to MVC views and accessing them using dynamic
Channel 9:
Channel 9 Live at PDC09: Coding 4 Fun
Channel 9:
Channel 9 Live at PDC09: Stephen Toub
WindowsClient:
Mouse Gestures for Internet Explorer
Channel 9:
Controlling concurrency in Rx
Channel 9:
Dev Tools Ecosystem Summit Videos Available
Microsoft Communities
ASP.NET
Channel 8
Channel 9
Channel 10
IIS.NET
Silverlight
TechNet Edge
WindowsClient
Mix Online