AnsweredAssumed Answered

Size of Data Card to Windows Form

Question asked by Robert Duncan on Apr 18, 2013
Latest reply on Apr 18, 2013 by Lee CS Young

I'm developing a Windows form where the user will locate a file in the vault. When the user clicks on the drawing, the data card will be displayed on the form.


My problem is the data card comes in very large and often runs off the edge of its container, or the form. Do you know if it is possible to scale the data card to fit into a certain area.


Here is how I'm adding the data card, adapted from the documentation in the API. I'm using C# here. This attaches the datacard to a panel control on the form.


file = myVault.GetFileFromPath(filePath, out folder);

thisCardView = folder.CreateCardView(file.ID, this.pnlDatacard.Handle.ToInt32(),

         0, 0, null);



Alternatively, I have been looking for ways to add individual fields from the data card as I don't really need the whole thing. And I really only need to display value of that control. But I can't figure out how to do that.

Say I have a field on the data card called "Supplier". I tried this, but it doesn't work. I think it returned the control type.


IEdmCard5 card = folder.GetCard("SLDDRW");

int controlID = card.GetControlID("Supplier");

IEdmCardControl5 control = card.GetControl(controlID);

lblSupplier.Text = control.ToString();