I have project where I have a BDPConnection, BDPDataAdapter, DataSet,
DBWebDataSource, DBWebNavigator and DBWebGrid all connected together to
display\edit a table from an database. This all works fine.
However, one of the columns I also want to edit must be editied using a
3rd party control (fckEditor for html editing) on the form. Its a BLOB
field as well.
What is the correct\best way of synchronising my fckEditor's value with
those of the DBWebDataSource so as when I finally ApplyUpdates, my
DataSet has the correct values for each row ready to be posted ? At the
moment I have got the DBWebDataSource's OnScroll event to be :
procedure TWebForm2.wdsMain_OnScroll(sender: System.Object; e:
Borland.Data.Web.OnScrollEventArgs);
var
LRowDropped: boolean;
LType: System.Type;
begin
wdsMain.SetColumnValue(tblDisplay_List, e.PriorRow, colDescription,
FCKeditor1.Value, LRowDropped);
if e.CurrentRow<tblDisplay_List.Rows.Count then
FCKeditor1.Value:=wdsMain.GetColumnValue(tblDisplay_List,
e.CurrentRow, 'DESCRIPTION', LType).ToString
else
FCKeditor1.Value:=cNewPageText;
end;
The idea being that when ever I scoll through the dataset, any changes
made in the fckEditor are sent back to the dataset for the 'PriorRow'
and then the next value is loaded into the fckEditor for the
'CurrentRow'. This so that when I do apply updates, the data is in the
dataset. Unfortunatly, when I insert a row, the dataset doesnt seem to
have the new row in it, so the above code falls over the on the first
line saying 'Row XYZ doesnt exist'. In other words e.PriorRow is out of
bounds.
Am I going about this completly wrong ? There must be a set way of
reading\writing to controls other than DBWeb based controls so as your
dataset\DBWebDataSource stays in sync ready for you to ApplyUpdates..
Any help, much appreciated!
Cheers
Bill.
--
Not any replies yet :-(
Does anyone know a better place to post this question ?
Thanks
Bill.
--
Hi Bill,
You could try:
borland.public.delphi.database.dotnet
--
Robin.
Australian Bridal Accessories := http://www.bridalbuzz.com.au
Turbo for Noobs (a work in progress) := http://turbofornoobs.blogspot.com/