Vault 2014 VDF - Find checkedout files in datagridview (RowStyleHandler)

Vault 2014 VDF - Find checkedout files in datagridview (RowStyleHandler)

davdelomb
Contributor Contributor
389 Views
1 Reply
Message 1 of 2

Vault 2014 VDF - Find checkedout files in datagridview (RowStyleHandler)

davdelomb
Contributor
Contributor

Hello,

 

At our company we created our own Vault Search. The search looks only for dwg and idw (state: released) and tif, tiff or pdf files (released or not released).

 

Now we would like to add a forecolor to the rows that contain checkedout files.

I got this to search for the checkedoutfiles in my datagridview, but it gives a conflict when i select a file in my datagridview.

I would like to know if there is an other way to find if a file in my datagridview is checkedout, and if so turn the forcolor in gray.

 

  1. Private Sub POARowStyleHandler(s As Forms.Currency.Style, ByVal entity As Vault.Currency.Entities.IEntity
  2. Try
  3. Dim ds As ACW.DocumentService = m_conn.WebServiceManager.DocumentService
  4. Dim fles() As ACW.File = ds.GetFilesByMasterId(entity.EntityMasterId)
  5. Dim fle As ACW.File = fles(UBound(fles))
  6. If fle.CheckedOut Then s.ForeColor = Color.Gray
  7. Catch
  8. End Try
  9. End Sub

 

 

 

0 Likes
390 Views
1 Reply
Reply (1)
Message 2 of 2

Anonymous
Not applicable

This may or may not make sense, but I think you need an object to wrap around your file. The datagridviewrow wants to bind to an object, and then you can change the property of the row based on the property of the object. I'm not sure it can be smart enough to directly bind to the file object (I could be wrong there, not an expert)

 

For example, let's say i have an object called a DrawingObject. And inside this DrawingObject, we say that there is an ACW.File DrawingFile, and a boolean property boolChecked.

 

So, when we assign the file we want to the DrawingObject (DrawingFile = file), we also set the boolean value (boolChecked = file.CheckedOut).

 

Then you bind the datagrid to a list of DrawingObjects, and bind the formatting based on that boolChecked Value.

 

If that's too obscure, let me know. I can try to be more specific.

 

Hope that helps,

Dave

0 Likes