Listview1 - selection does not respond

Hello.
Can anyone help?
I will move the list obtained via php SELECT from tbl in MySQL to Listview1.
obrázok

If I click on any line in Listview1, it does not respond.... (SelectionColor should change....in AfterPicking, Enable buttons should change...etc). None of that will happen.

Senior1954

Hi, the list shows correctly in listview?
Post the code you are using for after picking too

Probably responseCode is different from 200, which is why the blocks shown do not execute.

The letter is displayed correctly. Only after clicking, the row is not selected...
obrázok

Sorry...
The list is displayed correctly.

Can you post a simple project here showing this problem? With any sample list.

Edit.
After thinking about it, I can answer that any change to the properties of the ListView such as colors, font, etc., resets the entire ListView. You can't change the appearance of a ListView without creating the entire ListView from scratch.

You can try this:

1 Like

But you need to change colour selection or simply set it in settings in design editor?

Unfortunately, it doesn't work that way either...
In gTxtCelaDB after SELECT in the response there is:
1;aaaaaaaa|2;bbbbbbbb|3;ccccccc|4;dddddddd|

In ListView1 there is:
1;aaaaaaaa
2; bbbbbbb
3; ccccccc
4;dddddddd

I just need to change the color of the selected line ... and then activate the buttons ...

Not sure if this is what you need:

https://groups.google.com/g/mitappinventortest/c/Kt75jt6svVk/m/CBXPjsBtEQAJ

Thanks… I'm going to study it….

Are you trying to say that the After Picking event isn't fired at all?

Set ListView.SelectionColor out of the AfterPicking block...you can set it before picking.

I have the same behavior if set the SelectionColor inside the AfterPicking block, but it works if I set it out of the block (I don't know if it's a bug or not, but it's a bit strange behavior).

As I mentioned earlier, after changing any properties, the ListView is reset, and therefore the display of the selected item is also reset. You can get around this by reselecting the item programmatically.

1 Like

Thanks Patrik...I hadn't understood you...now I do. It works.

(added to FAQ)

I've already tried about everything with AfterPicking in ListView1... It won't work for me. Is there any other alternative than ListView1 to display the list?

Senior1954

Hello.
Which ListView extension can be used instead of ListView1 ?

Senior1954

Or you could build one using dynamic components: