Runtime changing of style of selected row

  • 10 March 2016
  • 1 reply
  • 9 views

Badge +1

Hi All,

I have a table and want to change the style (font color or background color) of the row that I have selected and trying to edit. How can I achieve this?

Many thanks for the answer beforehand

:)

Regards,

Saikat


1 reply

Userlevel 2
Badge +9

Hello Saikat,


 


When you say you are attempting to change the font color or background on a table, are you talking about an editable list view? Or is it an actual table control that you would like to change the styling for? It sounds like you are looking to change the styling on an editable list view, but I just want to be sure.


 


As for an editable list you could perhaps utilize some javascript to do this when you edit the row. So it would be on edit button clicked change the style to what you desire. You are going to have to drill deep down into the HTML to grab something to use in the javascript. In order to access the rows in the List View you are going to look for <tbody> node and this is deep into the HTML on the form. 


 


There is no OOB functionality to acheive very specific styling and customization on a K2 Form.


 


Another solution could be perhaps to create a custom theme to use on your K2 Forms. Please see the documentation below on how to work with custom themes.


 


http://help.k2.com/onlinehelp/k2smartforms/DevRef/current/default.htm#Creating_a_Custom_Theme.html


 


-Evan

Reply