Showing results for 
Search instead for 
Did you mean: 
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Need help navigating or using the PTC Community? Contact the community team. X

About the table control


About the table control

Hello everybody, masters and amateurs 😃

Ok, so I've been working with tablecontrols in XUI, however I haven't
found relevant information about their management quite easily, my
current problem now is related with delete or update one element in a
Table, let's say that I have the following tablecontrol:

<tablecontrol columns="2" fontweight="bold" foregroundcolor="#85002A"&lt;br"/>gridlines="false" height="200" id="table_results" resize="width">
<header id="encabezado">
<column id="topic" label="Topic"/">
<column id="value" label="Percentage"/"></header>

And that i need to insert some values and then delete them, my current
process in order to insert elements in the table is the following:

I must confess that I'm not pretty sure is this is the best way to do
it, however I didn't find any other fashion to accomplish my goal, I
detected that if I only call the dlgitem_set_table_cell_at() command
without the dlgitem_insert_list_at() first, then my data is not inserted
😞 I would really appreciate if someones could explain me why this
happens. Then, I'm trying to delete the elements in the table, however
something really strange is happening, I have used the
dlgitem_remove_table_row_at() command and the dlgitem_remove_list_at()
command, but both of this methods do not delete all the rows, I think
that the row which can not be deleted is a "selected" row, so I'm
supposing there's a kind of special feature which I must to detect or
disable. Please if anybody has a wide experience using tablecontrols I
would really appreciate your time, help and support.

Best Regards
Paulette Zorrilla


Just to clarify... about my selected row hypothesis in order to delete one, I have tested mydlgitem_remove_list_at() without select any row and I still can not delete all of them. Please help me! 😄

Paulette Zorrilla

I want to share with you guys mi resolution about this problem, my big mistake was that I didn't consider the following: once i delete a row, i have to update my indexdes in order to delete the remaining rows, and since I had an index which I was incrementing to delete the consecutive rows, my index was increasing while my list was decreasing, at the end my last calls to delete some rows didn't work because that rows didn't exist anymore, here's my code about how I solve this problem.

local rows = dlgitem_get_table_row_count($main::ENV['WALKING_WINDOW'],"table_results");

local i=1;




Top Tags