创建新话题
已回答

Double sorting

Hi.

I'm looking for a way to double sort, in this specific topic it's a grid.

Current definintion is very simple:

<Grid>
    <Options>
        <HeaderAutoHeight/>
        <Grouping/>
    </Options>
    <Columns>
          <!-- Columns removed just for compressing number of lines in this example -->

    </Columns>    
    <ForEachPart type="ITWB" sort="Attribute:5CON">
          <Row/>
    </ForEachPart>

</Grid>


This definition gives following result:

image


First I would like to sort the column Connector ID (as it's done now), then sort on column Cavity.

Connector ID is of type Enumeration and Cavity is of type String.

The result should be like this:

image


Any ideas?

/Stefan



最佳答案
Hi Stefan,

Currently we don't support double sort in grid, but I think it is a useful feature request.
However, there is a workaround way to handle that, using groupBy and sort at the same time.
To do so, groupBy Connector ID and sort by Cavit, see the example below.

<Grid>
    <Options>
        <HeaderAutoHeight/>

        <!--Enables grouping column number 2, which is Connector ID -->
        <Grouping groupBy="2"/>
    </Options>
    <Columns>
          <!-- Columns removed just for compressing number of lines in this example -->

    </Columns>    
    <ForEachPart type="ITWB" sort="Attribute:5CON">
          <Row/>
    </ForEachPart>

</Grid>


/Bashar

 


回答
Hi Stefan,

Currently we don't support double sort in grid, but I think it is a useful feature request.
However, there is a workaround way to handle that, using groupBy and sort at the same time.
To do so, groupBy Connector ID and sort by Cavit, see the example below.

<Grid>
    <Options>
        <HeaderAutoHeight/>

        <!--Enables grouping column number 2, which is Connector ID -->
        <Grouping groupBy="2"/>
    </Options>
    <Columns>
          <!-- Columns removed just for compressing number of lines in this example -->

    </Columns>    
    <ForEachPart type="ITWB" sort="Attribute:5CON">
          <Row/>
    </ForEachPart>

</Grid>


/Bashar

 

This works as a workaround.

Result:

image


And expanded:

image


And if you click on the pin

image


 you and select the items you want to work with, or even make custom filtering


image


Thanks Bashar.


/Stefan

登录 发表评论