We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy.
Unfortunately, activation email could not send to your email. Please try again.

Problem with LINQtoSQL and GroupingGridControl when changing a foreign key value

Thread ID:

Created:

Updated:

Platform:

Replies:

76242 Aug 28,2008 03:17 AM Aug 29,2008 05:32 AM Windows Forms 1
loading
Tags: GridControl
Detlef Birkholz
Asked On August 28, 2008 03:17 AM

Hi everybody,

I'm having a problem to get the GGC to work with LinqToSQL.

OK this is my starting point: I take the Northwind "Products" table, set up a LINQtoSQL datacontext, build a LINQ-Query with the products table and bind it to the datasource of a bindingsource. This bindingsource is then attached to the GGC.

So far the program works as expected: the grid shows all the data, grouping works like a charm.

But now the problem: when I change the value of the CategoryID to assign another category for the product and then leave the row I get a SaveRecord error. After some debugging I found the reason for the error: the datacontext claims that the product already has a foreign key value and that it can't assign a new value.

But now the fun part of the whole: if I only replace the GGC with a standard GDBG (GridDataBoundGrid) the above works without an error message.

Can someone tell me the reason why these to controls behave so differently? How can I get the GGC working without an error?

Yours Detlef


Jisha Joy [Syncfusion]
Replied On August 29, 2008 05:32 AM

Hi Detlef,

You can follow your DirectTrac incident 49226 for this query.

Regards,
Jisha


CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.

;