Jump to content

TUniDBEdit doesnt update field binded


SIRE Software

Recommended Posts

Good afternoon!

I have a problem when I assign a value to a TUniDBEdit using its property ".Text",  the field binded does not take the value.

Example:

Edit.Text :=  memTable.FieldByName('Value').asString;

i'm using a datasource and a tkbmmemtable binded to the DBtextEdit, the component shows the value assigned  but the field (  tkbmmemtable.fieldByName('Edit').asString; ) doesnt  get the value like the component

 

Link to comment
Share on other sites

6 hours ago, Victor Dominguez said:

I have a problem when I assign a value to a TUniDBEdit using its property ".Text",  the field binded does not take the value.

Example:

Edit.Text :=  memTable.FieldByName('Value').asString;

i'm using a datasource and a tkbmmemtable binded to the DBtextEdit, the component shows the value assigned  but the field (  tkbmmemtable.fieldByName('Edit').asString; ) doesnt  get the value like the component

Hello,

Can you make a simple testcase to see the issue?

Link to comment
Share on other sites

dbEdit issue.docxdbEditText.rar

Good morning!

Here is the requested example of the issue, i added an explanation of the issue (dbEdit issue.docx)

I take advantage of this message to add in the same example another issue that happens when you add a tabsheet at runtime to a pageControl and this tabSheet has assigned a client event (beforeClose), this event does't fire but if you assign the same event to a tabSheet at design time it fires as expected, thanks in advance.

 

Link to comment
Share on other sites

12 minutes ago, Victor Dominguez said:

another issue that happens when you add a tabsheet at runtime to a pageControl and this tabSheet has assigned a client event (beforeClose), this event does't fire but if you assign the same event to a tabSheet at design time it fires as expected, thanks in advance.

procedure TMainForm.UniButton2Click(Sender: TObject);
var TabSheet: TUniTabSheet;
    onCloseTab: String;
begin
    onCloseTab := 'function beforeclose(panel, eOpts){ '+
                    ' alert("close event"); ' +
                  '}';
    TabSheet := TUniTabSheet.Create(MainForm);
    with TabSheet do begin
        Caption := 'Tab 2';
        Name := 'Tab_2';
        Closable :=   true;
        ClientEvents.Enabled := true;
        ClientEvents.ExtEvents.Values['beforeclose'] := onCloseTab;
        PageControl := UniPageControl1;
    end;
end;

 

Link to comment
Share on other sites

26 minutes ago, Sherzod said:

procedure TMainForm.UniButton2Click(Sender: TObject);
var TabSheet: TUniTabSheet;
    onCloseTab: String;
begin
    onCloseTab := 'function beforeclose(panel, eOpts){ '+
                    ' alert("close event"); ' +
                  '}';
    TabSheet := TUniTabSheet.Create(MainForm);
    with TabSheet do begin
        Caption := 'Tab 2';
        Name := 'Tab_2';
        Closable :=   true;
        ClientEvents.Enabled := true;
        ClientEvents.ExtEvents.Values['beforeclose'] := onCloseTab;
        PageControl := UniPageControl1;
    end;
end;

 

thank you! it worked!

Link to comment
Share on other sites

On 3/5/2021 at 10:49 AM, Sherzod said:

TkbmMemTable?

Hello!

Here is the example  again but now i'm using a TClientDataSet component, i believe it's a native component and it is presenting the same issue. I hope you can give me some feedback so i can continue with my project. thank you in advance  and i appreciate your help.dbEditText.rar

Link to comment
Share on other sites

15 minutes ago, Victor Dominguez said:

Here is the example  again but now i'm using a TClientDataSet component, i believe it's a native component and it is presenting the same issue. I hope you can give me some feedback so i can continue with my project. thank you in advance  and i appreciate your help.dbEditText.rar

Hello,

Can you use this approach at the moment?

procedure TdbEditExampleForm.btnAsignarTextoClick(Sender: TObject);
begin
   //dbEditClave.text := inputTexto.Text;
   dbEditClave.Field.Value := inputTexto.Text;
end;

 

Link to comment
Share on other sites

2 minutes ago, Sherzod said:

Hello,

Can you use this approach at the moment?


procedure TdbEditExampleForm.btnAsignarTextoClick(Sender: TObject);
begin
   //dbEditClave.text := inputTexto.Text;
   dbEditClave.Field.Value := inputTexto.Text;
end;

 

We are using that workaround and even asigning the value directly to the memtable's field. Since we're migrating a desktop application it would be very helpful that we could use the ".text" property so we don't have to be looking for that particularity in the code to change it.

Thanks for taking the time to reply!

Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • Create New...