Click here to Skip to main content
15,903,201 members
Home / Discussions / Windows Forms
   

Windows Forms

 
QuestionWinforms Html Editor Pin
tarjeetsalh7-Mar-13 1:41
tarjeetsalh7-Mar-13 1:41 
AnswerRe: Winforms Html Editor Pin
Dave Kreskowiak7-Mar-13 2:27
mveDave Kreskowiak7-Mar-13 2:27 
GeneralRe: Winforms Html Editor Pin
tarjeetsalh10-Mar-13 21:28
tarjeetsalh10-Mar-13 21:28 
GeneralRe: Winforms Html Editor Pin
Dave Kreskowiak11-Mar-13 5:41
mveDave Kreskowiak11-Mar-13 5:41 
QuestionThread Leak Pin
michaelbarb25-Feb-13 5:12
michaelbarb25-Feb-13 5:12 
AnswerRe: Thread Leak Pin
Bernhard Hiller27-Feb-13 23:36
Bernhard Hiller27-Feb-13 23:36 
GeneralRe: Thread Leak Pin
michaelbarb28-Feb-13 3:34
michaelbarb28-Feb-13 3:34 
AnswerRe: Thread Leak Pin
Pete O'Hanlon28-Feb-13 1:40
mvePete O'Hanlon28-Feb-13 1:40 
GeneralRe: Thread Leak Pin
michaelbarb28-Feb-13 3:38
michaelbarb28-Feb-13 3:38 
GeneralRe: Thread Leak Pin
Pete O'Hanlon28-Feb-13 3:41
mvePete O'Hanlon28-Feb-13 3:41 
GeneralRe: Thread Leak Pin
michaelbarb28-Feb-13 4:11
michaelbarb28-Feb-13 4:11 
GeneralRe: Thread Leak Pin
Dave Kreskowiak28-Feb-13 4:17
mveDave Kreskowiak28-Feb-13 4:17 
GeneralRe: Thread Leak Pin
Pete O'Hanlon28-Feb-13 4:30
mvePete O'Hanlon28-Feb-13 4:30 
AnswerRe: Thread Leak Pin
michaelbarb18-Jun-13 4:57
michaelbarb18-Jun-13 4:57 
QuestionElements of a toolstrip witin an usercontrol get deleted when copying/pasting the usercontrol. Pin
priyamtheone18-Feb-13 4:41
priyamtheone18-Feb-13 4:41 
QuestionData Binding to an Object that may be Read Only Pin
Simon Bridge4-Feb-13 11:46
Simon Bridge4-Feb-13 11:46 
AnswerRe: Data Binding to an Object that may be Read Only Pin
Eddy Vluggen9-Feb-13 9:30
professionalEddy Vluggen9-Feb-13 9:30 
GeneralRe: Data Binding to an Object that may be Read Only Pin
Simon Bridge10-Feb-13 10:45
Simon Bridge10-Feb-13 10:45 
It seems to be a big gap in the visual studio data-binding extensions - there is no support for read only entities or even read only properties.

Properties that are compiled as read-only do not get treated any differently.

I even implemented the ICustomTypeDescriptor interface, but the binding source, while it reads off a set of properties for each object, it only checks the "IsReadOnly" property from the first record, and it doesn't even appear to affect how it binds the data source to the controls.

I am coping with the issue by:

1) each entity implements IEditableObject.
2) in the IEditableObject.BeginEdit() method, the entity attempts to acquire a lock. If it cannot acquire the lock, the entity is ReadOnly. I removed any exceptions thrown at this point: the lock fails silently.
3) I have handled the CurrentItemChanged event from the BindingSource. In this handler, I check if the entity is read-only, and update the enabled state of the associated controls.

This seems to be working for now, but I am faced with another issue:

the BindingSource component, doesn't always call IEditableObject.EndEdit() or IEditableObject.CancelEdit() for every item it has called IEditableObject.BeginEdit() on.... this seems like a fairly dramatic design flaw in this component.

Am I not disposing of it correctly?
GeneralRe: Data Binding to an Object that may be Read Only Pin
Eddy Vluggen12-Feb-13 7:53
professionalEddy Vluggen12-Feb-13 7:53 
GeneralRe: Data Binding to an Object that may be Read Only Pin
Simon Bridge12-Feb-13 10:55
Simon Bridge12-Feb-13 10:55 
GeneralRe: Data Binding to an Object that may be Read Only Pin
Eddy Vluggen12-Feb-13 12:27
professionalEddy Vluggen12-Feb-13 12:27 
QuestionImplement jQuery Tag-it functionality in C# Win Form Pin
Member 29389611-Feb-13 7:47
Member 29389611-Feb-13 7:47 
QuestionRe-write a MS Access application to Visual Studio Pin
Jaap Britz19-Jan-13 23:23
Jaap Britz19-Jan-13 23:23 
AnswerRe: Re-write a MS Access application to Visual Studio Pin
Eddy Vluggen20-Jan-13 2:32
professionalEddy Vluggen20-Jan-13 2:32 
GeneralRe: Re-write a MS Access application to Visual Studio Pin
Maciej Los19-Mar-13 7:01
mveMaciej Los19-Mar-13 7:01 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.