View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0003890 | JEDI VCL | 00 JVCL Components | public | 2006-09-09 06:40 | 2007-12-16 11:44 |
Reporter | moore | Assigned To | AHUser | ||
Priority | normal | Severity | major | Reproducibility | always |
Status | resolved | Resolution | fixed | ||
Product Version | Daily / GIT | ||||
Target Version | Fixed in Version | 3.34 | |||
Summary | 0003890: JvDBRichEdit puts Dataset in edit mode | ||||
Description | just put a dataset and a datasource and link a JvDBRichEdit, open the dataset on form load and it will be open in edit mode without making any edit/insert operation, make the JvDBRichEdit Datasource property to nil and the dataset opens normally, that is, browse mode.. | ||||
Tags | No tags attached. | ||||
|
Please provide the zipped sources of a sample application that shows this behaviour. |
2006-09-09 09:35
|
Richdit.zip (1,484 bytes) |
|
Simple example source included.. |
|
It's because of the TJvDBRichEdit.EMSetCharFormat function that calls EditCanModify. What do you suggest we do? |
|
On creating component call EMSetCharFormat, this procedure call EditCanModify and this procedure Check if DataLink is in EditMode, if not then FDataLink.Edit. I correct this to check if datasource autoedit is true, and EMSetCharFormat procedure post change (see below) procedure TJvDBRichEdit.EMSetCharFormat(var Msg: TMessage); begin if FMemoLoaded then if not FUpdating then if EditCanModify then begin Change; if (FDataLink.Editing) then //<----- Added FDataLink.DataSet.Post; //<----- Added end; inherited; end; function TJvDBRichEdit.EditCanModify: Boolean; begin FStateChanging := True; try Result := FDataLink.Editing; if not Result and Assigned(FDataLink.Field) then try if FDataLink.Field.IsBlob then FDataSave := FDataLink.Field.AsString; Result := FDataLink.DataSource.AutoEdit and FDataLink.Edit; finally FDataSave := ''; end; finally FStateChanging := False; end; end; |
|
I think it's better to replace this : FDataLink.DataSet.Post; //<----- Added with this : FDataLink.DataSet.CheckBrowseMode; |
|
That it puts in Edit mode - it is half a problem. But if you will change this method with Post - then probl;ems will be more then before. Have thought about aftereffects? |
|
Anyone care to propose a non breaking solution? |
|
Hello ? |
|
Fixed in SVN |
Date Modified | Username | Field | Change |
---|---|---|---|
2006-09-09 06:40 | moore | New Issue | |
2006-09-09 08:59 | obones | Note Added: 0010088 | |
2006-09-09 08:59 | obones | Status | new => feedback |
2006-09-09 09:35 | moore | File Added: Richdit.zip | |
2006-09-09 09:36 | moore | Note Added: 0010089 | |
2006-10-06 03:33 | obones | Note Added: 0010308 | |
2006-11-03 08:07 | ultimo | Note Added: 0010409 | |
2007-01-18 02:42 | moore | Note Added: 0010565 | |
2007-02-03 02:58 | ZENsan | Note Added: 0010697 | |
2007-06-19 07:04 | obones | Note Added: 0013437 | |
2007-10-12 04:21 | obones | Note Added: 0013898 | |
2007-12-16 11:44 | AHUser | Status | feedback => resolved |
2007-12-16 11:44 | AHUser | Fixed in Version | => Daily / SVN |
2007-12-16 11:44 | AHUser | Resolution | open => fixed |
2007-12-16 11:44 | AHUser | Assigned To | => AHUser |
2007-12-16 11:44 | AHUser | Note Added: 0014063 |