Page 1 of 1

Label with Data Link.

PostPosted: 05 Mar 2015 18:29
by Aggie85
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

Re: Label with Data Link.

PostPosted: 05 Mar 2015 19:13
by Alexander Bulei
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.

Re: Label with Data Link.

PostPosted: 05 Mar 2015 19:19
by Aggie85
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

Re: Label with Data Link.

PostPosted: 06 Mar 2015 18:25
by Alexander Bulei
Hi Aggie85,

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

Best Regards.

Re: Label with Data Link.

PostPosted: 06 Mar 2015 18:32
by Aggie85
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

Re: Label with Data Link.

PostPosted: 11 Mar 2015 20:07
by Aggie85
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