Quantcast
Channel: VMware Communities: Message List
Viewing all articles
Browse latest Browse all 219257

Re: Sort existing column (eg: Status) on click of ColumnHeader for VM grid

$
0
0

If you want to make your newly added columns sortable, there is an example in the SDK that demonstrates this.

Please look at the chassisRackVSphere-ui sample.

 

            <!-- Chassis name column -->            <com.vmware.ui.lists.ColumnContainer>              <uid>com.vmware.samples.chassis.column.name</uid>              <dataInfo>                  <com.vmware.ui.lists.ColumnDataSourceInfo>                    <!-- Column header -->                    <headerText>#{name}</headerText>                    <!-- Object property whose text value will be displayed (array of 1 elt) -->                    <requestedProperties>                        <String>name</String>                    </requestedProperties>                    <!-- Use sortProperty to allow column to be sorted with header click -->                    <sortProperty>name</sortProperty>                    <!-- Use exportProperty to allow column data to be exported -->                    <exportProperty>name</exportProperty>                  </com.vmware.ui.lists.ColumnDataSourceInfo>              </dataInfo>            </com.vmware.ui.lists.ColumnContainer>

 

The sortProperty should enable the sorting. And of course your backend service should support that. In the example this is the chassisRackVSphere-service.


Viewing all articles
Browse latest Browse all 219257

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>