1

i have an object, its definition is

public class ExigenceResultDto
{
    public string NameExigence { get; set; }
    public Collection<string> ExigenceList { get; set; }
    public ExigenceResultDto()
    {
        ExigenceList = new Collection<string>();
    }
}

i want to display the result on Html page, using angularJS, the displayed table is not as i would it; it want thet every item on the result List will be displayed in a row with two columns, the first one is for the Name, and the second one is for the ExigenceList attribute. BUT I get a bad table display. My Html code is :

<table class="table table-bordered table-hover" style="max-height: 500px; overflow-y: auto" border="1">
    <tr>
        <th> Exigence Name</th>
        <th> List </th> 
        </tr>




    <tr data-ng-repeat="item in list" style="background-color: #F5F5F5">
        <td rowspan="{{item.ExigenceList.length}}">
            {{item.NomExigence}}
        </td>


        <td data-ng-repeat="subitem in item.ExigenceList track by $index" style="background-color: #F5F5F5">
            {{subitem}}
        </td>

    </tr>
</table>

Any solution to display the table as i want please ?

5
  • What is the actual javascript structure of list? Commented May 7, 2015 at 11:15
  • possible duplicate of Angularjs: use of rowspan to group hierarchical data Commented May 7, 2015 at 11:19
  • the structure is defined on the begining : 'ExigenceResultDto' class Commented May 8, 2015 at 7:13
  • @JeremyThille the structure of list is a Collection of ExigenceResultDto Commented May 11, 2015 at 9:22
  • public ExigenceResultDto() { ExigenceList = new Collection<string>(); } This is not javascript. This is C# I think, but I don't know C#, and I don't know what it produces exactly. Angular is javascript, parses javascript, and doesn't mind how and with what language that javascript has been produced upstream (and so do I :) That's why I'd like to know the actual javascript structure of list. The one that's being parsed by Angular. Commented May 11, 2015 at 9:48

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.