Hello ! I have a FormTable with BackColor = 255,255,255 and SelectionMode=SingleRow. On Selection event, I want that row I select to change its color to 170,170,170 for example, and when I select other row, the previous row to change its color to table's BackColor(255,255,255). I found this impossible to solve. Can somebody help me please? It is very important to me .
You can not change background of selected rows. This is the part of 1C:Enterprise platform design. But maybe you can explain your task in more details, so we could suggest another solution?
When I sel ect an entry fr om the FormTable, I need that row to change its color to any color, even to 1c's yellow, to know what is the selected row. I need to get a visual feedback of the selection.
I don't understand then what is the problem? I set the background color of a list and select items, they all have the background that I set (after clearing the UseAlternationRowColor check box) and when I select one of rows, I see it having yellow background.
I have attached the infobase dump to this message. You can use it to create your own example how to reproduce your issue.
My application is for Mobile and my FormTable is in a Form from common forms. I set the FormTable's BackColor to 178,178,178, but on Mobile, the BackColor is still white. When I press on a row to select it, I can see that row's color changes to yellow, but when I release, it goes back to white, instead of staying yellow.
I tried to do this in a mobile application and when I click a row in a table, the item form is opened, so you don't see the list after selecting a row. How do you do this in your mobile application?
I think you didn't understand me. I am working on a form in common forms. In this form, I have a FormTable set to ReadOnly. I am not using a list form. All I need to do is when I select a row ( on mobile platform ), that row should change its color to yellow.
I have added a boolean field to the table that keeps the state of a string, a conditional appearance to the form for this field value, and those 2 lines of code to the row selection event handler:
Code
SelectedRowObject = ProductsTable.FindByID(SelectedRow);
SelectedRowObject.Selected = Not SelectedRowObject.Selected;
Please, find an example in the attached configuration.