Discussions regarding 1C:Enterprise for mobile devices with Android, iOS, or Windows Phone.

#1
People who like this: 0 Yes / 0 No
Just came
Rating: 1
Joined: Mar 23, 2016
Company: SmartID

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 .

Edited: Sebastian Dan - Apr 08, 2016 06:05 AM
 
#2
People who like this: 0 Yes / 0 No
Timofey Bugaevsky
Guest

Joined:
Company:

Hello, Sebastian Dan!

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?

 
#3
People who like this: 0 Yes / 0 No
Just came
Rating: 1
Joined: Mar 23, 2016
Company: SmartID

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.

Edited: Sebastian Dan - Apr 11, 2016 01:28 AM
 
#4
People who like this: 0 Yes / 0 No
Timofey Bugaevsky
Guest

Joined:
Company:

Sebastian Dan,

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.

Download 1Cv8.dt (33.21 KB)
Download list.png (31.05 KB)
 
#5
People who like this: 0 Yes / 0 No
Just came
Rating: 1
Joined: Mar 23, 2016
Company: SmartID

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.

 
#6
People who like this: 0 Yes / 0 No
Timofey Bugaevsky
Guest

Joined:
Company:

Sebastian Dan,

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?

 
#7
People who like this: 0 Yes / 0 No
Just came
Rating: 1
Joined: Mar 23, 2016
Company: SmartID

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.

 
#8
People who like this: 0 Yes / 0 No
Timofey Bugaevsky
Guest

Joined:
Company:

Can you please create a sample configuration where I could reproduce this issue?

 
#9
People who like this: 0 Yes / 0 No
Just came
Rating: 1
Joined: Mar 23, 2016
Company: SmartID

Sorry for late reply.

Please download this *.cf and run it on mobile.

Edited: Sebastian Dan - Apr 12, 2016 01:03 AM
 
#10
People who like this: 1 Yes / 0 No
Timofey Bugaevsky
Guest

Joined:
Company:

Hello,

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.

Download 1Cv8.cf (8.51 KB)
 
#11
People who like this: 0 Yes / 0 No
Just came
Rating: 1
Joined: Mar 23, 2016
Company: SmartID

Thank you very much, Timofey !
This solved my problem.

 
Subscribe
Users browsing this topic (guests: 1, registered: 0, hidden: 0)
Be the first to know tips & tricks on business application development!

A confirmation e-mail has been sent to the e-mail address you provided .

Click the link in the e-mail to confirm and activate the subscription.

/* --- ФИКС ЗАГОЛОВКОВ ДОКУМЕНТАЦИИ (BRUTE FORCE) --- */ /* Цепляемся за все возможные контейнеры Битрикса */ .content h1, #content h1, .workarea h1, .content h2, #content h2, .workarea h2, .content h3, #content h3, .workarea h3, .content h4, #content h4, .workarea h4, .content h5, #content h5, .workarea h5, .content h6, #content h6, .workarea h6 { display: block !important; font-weight: 700 !important; color: #222 !important; text-transform: none !important; margin-top: 1.5em !important; margin-bottom: 0.5em !important; line-height: 1.2 !important; } /* Явно задаем размеры, чтобы перекрыть "font-size: 100%" */ .content h1, #content h1 { font-size: 28px !important; } .content h2, #content h2 { font-size: 24px !important; } .content h3, #content h3 { font-size: 22px !important; } .content h4, #content h4 { font-size: 20px !important; } .content h5, #content h5 { font-size: 18px !important; } /* Ваш случай (5 решеток) */ .content h6, #content h6 { font-size: 16px !important; } /* Если Битрикс или редактор засунули внутрь h5 тег span или font */ .content h5 *, #content h5 *, .workarea h5 * { font-size: inherit !important; color: inherit !important; font-weight: inherit !important; } /* --- СТИЛИЗАЦИЯ ТЕКСТА (Markdown Style) --- */ /* Ссылки в тексте делаем более заметными */ .content a:not([class]) { color: #005aa0; text-decoration: none; border-bottom: 1px solid rgba(0, 90, 160, 0.2); } .content a:not([class]):hover { border-bottom-color: #005aa0; } /* Списки (чтобы не прилипали) */ .content ul, .content ol { margin-bottom: 15px !important; padding-left: 20px !important; } .content li { margin-bottom: 5px !important; }