+1
Ожидает ответа пользователя

good_list, how does it work?

Benno Evers 7 лет назад в Приложения / i3 Pro обновлен Dmitry - support (expert) 7 лет назад 3

Hello, 


Can anyone give me an example of goodlist where:
  1. We can add an item to the list and specifiy  a few properties, like color and text from outside the list and inside the list
  2. We can delete 1 specified item from te list

The example in the JS handbook isn't clear to me.

It looks like I add an item by just incrementing the total value. When doing this GetItem will be called automatically, but how can I change the properties of the element i've just added? I've tried from the outside like this: 

l_oGList1.Adapter.GetItem(4).GetItem("Item_name").Text = "Hello"

But that doesn't work, also when I call 

l_oGList1.Update() 

it doesn't show the text in the added elements.


Thanks

Ожидает ответа пользователя

Hello!


The "Update" function always completely updates the list, ie it removes items from the list, and then added new.


Therefore, if you want to change the text on any element, then you need to do this as follows.

For example:






Assume we have an array of artists. How would I do that?

Probably I will do something like increasing the total for each element I want to add. At that point the items will be added, and GetItem will be called for each item I add. But how can I tell GetItem which text to take? It's an dynamic array so can't tell upfront what to put in as text.

If you get a list of artists from the equipment, then first, you can put the names of

the artists in the array, and then from this array fill the elements on
the List.
For example:



Сервис поддержки клиентов работает на платформе UserEcho