VMware {code} Community
abhishekdubey
Enthusiast
Enthusiast
Jump to solution

Filter DataGrid

hi,

i am able to populate my data of virtual machines in the datagrid  with capability to sort the columns using sdk specific "sortProperty"  of ColumnDataSourceInfo hovewer i am not able to Filter the data in  datagrid.

In the highlighted oval in the below screen i tried to filter data by putting some matching Strings in the grid like "VM-1" but it is not working.?

When i applied the filter it is displaying 0 rows...?

FilterNotWorking.JPG

Is there any specific way to make this filter enable(work)..?

Because this filter is come automatically when creating datagrid.?

do we have any sample in the sample project given with the SDK.?

Tags (1)
0 Kudos
1 Solution

Accepted Solutions
laurentsd
VMware Employee
VMware Employee
Jump to solution

> "The import com.vmware.vise.data.query.Comparator cannot be resolved."

Right, that class was omitted from the 5.1 SDK library .jar file but you can link with the following .jar to solve the compilation problem:

/serenity-client/plugin-packages/vsphere-client/plugins/data-services-1.0.0.jar

View solution in original post

0 Kudos
4 Replies
laurentsd
VMware Employee
VMware Employee
Jump to solution

You're in luck 🙂   The chassis-app sample was updated to support this filtering, The ChassisRackVSphereDataAdapter now supports PropertyConstraint and Comparator.TEXTUALLY_MATCHES among other things.

It is already available in the 5.5 beta 1 SDK but I am attaching a version that should work with 5.1 too.

0 Kudos
abhishekdubey
Enthusiast
Enthusiast
Jump to solution

Hi laurent,

I tried with 5.1 even with taking reference to code given by you but it seem the classes used

is Comparator not available in 5.1 SDK.

because i am getting the error as

"The import com.vmware.vise.data.query.Comparator cannot be resolved."

is this can be soved or we have to use the 5.5 sdk

0 Kudos
abhishekdubey
Enthusiast
Enthusiast
Jump to solution

FYI we are using  vsphere-client-sdk-version SDK 1.0.0

<?xml version="1.0" ?>

- <vsphere-client-sdk>

<name>SDK 1.0.0</name>

<version>1.0.0</version>

<build>797199</build>

</vsphere-client-sdk>

0 Kudos
laurentsd
VMware Employee
VMware Employee
Jump to solution

> "The import com.vmware.vise.data.query.Comparator cannot be resolved."

Right, that class was omitted from the 5.1 SDK library .jar file but you can link with the following .jar to solve the compilation problem:

/serenity-client/plugin-packages/vsphere-client/plugins/data-services-1.0.0.jar

0 Kudos