Apply border bottom to last row in a table field value

5 posts, 0 answers
  1. sudo
    sudo avatar
    4 posts
    Member since:
    Jun 2017

    Posted 15 Jun Link to this post

    I have a table that takes in an object data source which returns me back a list of objects that I populate the table row/columns with. 

    In one of my row fields I have an expression like this Fields.Description which are grouped together so my table would look a little something like this:

     

    ---------------------------------------------------------

    Col 1        Description

                    Description1

                    Description2

                    Description3

    Col 2        Description1

                    Description2

                    Description3

     

    and so forth. I need to close the border at the bottom of the last Descriptions. Need some help getting started on how to apply the conditional formatting so that it will find out which is the data item on each row and then apply a border bottom on that to close the row off.

     

    Thanks.

     

  2. Nasko
    Admin
    Nasko avatar
    1021 posts

    Posted 20 Jun Link to this post

    His sudo,

    You can use the built-in functions Count() and RowNumber() inside the scope of the Col group. If the count of the items in the group is equal to the current row number, this means you are positioned at the last row of the group where the bottom border should be.
    Another option is to use just RowNumber() and if it is equal to 1, then you are positioned at the first row of the group and a top border can be applied.

    In principle the approach is very similar to displaying reports with alternating style rows.

    Regards,
    Nasko
    Progress Telerik
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
  3. sudo
    sudo avatar
    4 posts
    Member since:
    Jun 2017

    Posted 26 Jun in reply to Nasko Link to this post

    Hi Nasko,

    Thanks for the reply. I've tried the first way you've mentioned since I need to apply the border to bottom or else my very last row will have no border bottom as I've set border botton and to none. If I've set any border bottom then for every item in my column there will be a border at the bottom and that's not what I want.

    I've tried setting a conditional format like so =Exec('colgroup', Count(Fields.Description)), Operator =, Value RowNumber() but I'm getting a Cannot perform operation on System.int32 and System.string.

  4. Nasko
    Admin
    Nasko avatar
    1021 posts

    Posted 28 Jun Link to this post

    Hi stanley,

    The second expression returns string because it has not been evaluated. If you write just RowNumber() the string "RowNumber()" will be used for the comparison. To evaluate an expression use an equal sign in the beginning: = RowNumber()

    Regards,
    Nasko
    Progress Telerik
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
  5. sudo
    sudo avatar
    4 posts
    Member since:
    Jun 2017

    Posted 10 Jul Link to this post

    Thanks Nasko that worked perfectly.
Back to Top