CGDevTools Forum

Welcome to the Official CGDevTools Support Community Forums.

Label with Data Link.

by Aggie85 » 05 Mar 2015 18:29

Howdy All!

I have several JQLabelEx controls attached to a memory table.

The table only holds one record.

When I add a record from an AJAX event, the controls are automatically updated.

I have a Clear button with an AJAX event that empties the table. The data linked labels do NOT clear. I have even tried setting the label's Text field directly and the fields temporarily clear until another AJAX event occurs and then the "previous deleted value" is reshown. If I do a full submit, all works.

So my question is how do I get a data linked label to update with the linked data set from within an AJAX event. The only solution I think I have found is to unbound the controls and just set their Text value directly.

Thanks in advance!

Aggie85
Aggie85
 
Posts: 273
Joined: 15 May 2013 02:24

by Alexander Bulei » 05 Mar 2015 19:13

Hi Aggie85,

I have a Clear button with an AJAX event that empties the table. The data linked labels do NOT clear.


Can you provide the code or simple project?

T.I.A

Best Regards.
Group: Developers | Support Team

  • info [at] cgdevtools.com - General information
  • sales [at] cgdevtools.com - Sales department
  • support [at] cgdevtools.com - Product and Technical Support
User avatar
Alexander Bulei
Site Admin
 
Posts: 3635
Joined: 15 May 2012 08:52
Location: Mealhada, Portugal

by Aggie85 » 05 Mar 2015 19:19

Alexander Bulei wrote:Hi Aggie85,

I have a Clear button with an AJAX event that empties the table. The data linked labels do NOT clear.


Can you provide the code or simple project?

T.I.A

Best Regards.


Howdy Alex!

From within my OnButtoClick, I just call the TkbmMemTable as follows (last variation as all have failed other than using unbound controls):

void __fastcall Form::OnButtonClick(....)
{
CurrentTicketTable->DisableControls():
CurrentTicketTable->EmptyTable();
CurrentTicketTable->EnableControls();
}

I have also tried using

CurrentTicketTable->Delete() ;
CurrentTicketTable->First();

as the table only has one record.

What is the proper way to update labels with data-links from as AJAX event? If the solution is to just unbound them and update them, that works for me as I only have to implement it once!

Thanks again!

Aggie85
Aggie85
 
Posts: 273
Joined: 15 May 2013 02:24

by Alexander Bulei » 06 Mar 2015 18:25

Hi Aggie85,

I will try reproduce this problem here...
Thanks..

Best Regards.
Group: Developers | Support Team

  • info [at] cgdevtools.com - General information
  • sales [at] cgdevtools.com - Sales department
  • support [at] cgdevtools.com - Product and Technical Support
User avatar
Alexander Bulei
Site Admin
 
Posts: 3635
Joined: 15 May 2012 08:52
Location: Mealhada, Portugal

by Aggie85 » 06 Mar 2015 18:32

Alexander Bulei wrote:Hi Aggie85,

I will try reproduce this problem here...
Thanks..

Best Regards.


Alexander,

I have removed all data links and use unbound controls and it works great in all modes (i.e. ajax and full submit). In ajax events, it probably isn't reasonable to expect data-aware controls to be automatically updated. If this is true, please don't waste your time. I am perfectly content with using unbound controls and updating their values from within ajax events as needed.

Have a great weekend!

Aggie85
Aggie85
 
Posts: 273
Joined: 15 May 2013 02:24

by Aggie85 » 11 Mar 2015 20:07

Howdy Alexandre!

I just wanted to drop y'all an apology on this bug report.

The problem turned out to be a bug in the latest version of TkbmMemTable. The same problem exists with DevExpress controls in a normal Windows program.

Again, please accept my apology for wasting your time.

Best Regards,

Aggie85
Aggie85
 
Posts: 273
Joined: 15 May 2013 02:24


Return to JQLabelEx

cron

Who is online

Users browsing this forum: No registered users and 1 guest

Contact Us.