Linq-SQL canonical editable datagridview sample code

A

Andrus

Marc,
Call me crazy, but a drop-down isn't the first choice I'd use for
this!

What control I must use in grid ?
I need also show some butotn for active cell so user can can open picklist
using mouse.
Combobox has all required ui elements.
I don't know where the problem is; normally, EndNew/CancelNew are used
correctly, but in the code you posted RemoveItem indeed doesn't get
called. I dont' know why.

Should I check boolean field and issue CancelNew before calling AddNewCore()
if I detect that
previous new row is not committed ?

Andrus.
 
M

Marc Gravell

What control I must use in grid ?
Maybe a link label, and handle the even by presenting a sensible
search dialog?
 I need also show some butotn for active cell so user can can open picklist
using mouse.
Combobox has all required ui elements.
Fair enough...
Should I check boolean [snip]
I simply don't know. Sorry.

Marc
 
A

Andrus

What control I must use in grid ?
Maybe a link label, and handle the even by presenting a sensible
search dialog?

There must be possibility to enter customer name from keyboard directly to
list.
So this requires to create separate linklabel column in grid. Is this
reasonable ?
I simply don't know. Sorry.

It seems that AddNewCore() calls ListChanged() event which confuses grid. I
fixed this by using

RaiseListChangedEvents = false;
row = base.AddNewCore() as T;
RaiseListChangedEvents = true;

Hope this is OK.

Andrus.
 
A

Andrus

Attached solution to your message contains WPF code which looks the same as
in previous message

WPF: Custom control and resorce files in a different assembly.

I was unable to run this solution:

Error 1 Metadata file
'C:\CustomExpanderControl\TestHarnes\CustomExpander\bin\Release\CustomControls.dll'
could not be found TestHarnes

Error 2 Cannot find the type 'res:CustomResources'. Note that type names are
case sensitive. Line 22 Position 27.
C:\CustomExpanderControl\TestHarnes\CustomExpander\Controls\TestExpander.xaml
22 27 CustomControls

This attachment seems not related to your question.

I'm using Marc code sample with one fix without issues.
I do'nt remember which issue I described in post you referenced.

Andrus.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top