cancel
Showing results for 
Search instead for 
Did you mean: 

Filter in tableView

Former Member
0 Kudos

Hello,

I am using a TableView with filter-functionality. Can i make the filter line look different so that it differs from the "normal" rows of the table? A TableViewIterator is already used.

Regards,

ALEX

Accepted Solutions (0)

Answers (2)

Answers (2)

maximilian_schaufler
Active Contributor
0 Kudos

Enhancing the first answer a bit:

<htmlb:documentHead title="test " >
  <htmlb:headInclude/>
  <style type="text/css">
      .urSTTDEd1 .urEdf2TxtEnbl {
        background-color:yellow !important
      }
  </style>
</htmlb:documentHead>

*) Note the second class name used - without it all input fields would use this style, but in this slightly enhanced version only all input fields within tableviews are changed.

*) The headInclude element is needed to not let standard CSS overwrite your own addition.

Read this weblog for more information on custom styles:

<a href="/people/sap.user72/blog/2005/04/12/bsphowto-css-hints--custom-design-for-your-bsp-applications">BSP/HowTo: CSS Hints - Custom Design for your BSP Applications</a>

Another enhancement puts you in position of browser-dependancy. This example makes use of attribute selectors of CSS2, which are available in Firefox, IE7, but not in IE6:

input[name="tvID-filter_1"] { background-color:yellow !important }

Using this attribute selector you can change the style of elements with certain attributes/values, in this case the "name" attribute is checked for the value "tvID-filter_1". Input fields for filter rows are named with the ID of the tableview, then a "-", followed by "filter_" and the number of the column.

You could add styles for how much columns/filter input fields you need, and not touch any other input fields - but always remember that this will not work in IE6, which might be a reason for you to not go with this solution.

Max

P.S.: Mark your thread as a question to be able to dish out points.

Thilo
Explorer
0 Kudos

Not very good, but works in some cases:

<style type="text/css">
    .urEdf2TxtEnbl {
      background-color:yellow !important
    }
</style>

<htmlb:tableView id              = "TblRepMod" ...

Regards,

Thilo