I am trying to display pictures with text in the UltraGrid (passport photo with name and dob for example).
According to the Infragistics documentation you can embed the WinFormattedLinkLabel in WinGrid. That seems a good option, but I have no idea how to go about that. Anyone?
Maybe you can use the UltraFormattedLinkLabel or UltraFormattedTextEditor and assign it to the EditorControl of the UIltraWinGrid?
Add the controls to the toolbox and you can try some settings and look at some code...
Edit: Couldn't resist... I was able to display an image (from disk that is) in a UltraFormatted* Control. But I could not link the control to a cell of row in the WinGrid. No results assigning the EditorControl to the UltraFormatted* Control...
Message was edited by:
Simon de Kraa
I am trying to display pictures with text in the
UltraGrid (passport photo with name and dob for
example).
I've seen it done by setting the GridColumn's Editor to an EmbeddableImageRenderer or just by assigning its Style to Image (Assume band is pointing to the UltraGrid band).
band:Columns:Editor = new Infragistics.Win.EmbeddableImageRenderer().
band:Columns:Style = Infragistics.Win.UltraWinGrid.ColumnStyle:Image.
It's fully possible that the end result is the same, at least both approaches enable an image stored as BLOB in Progress data to be visualized. The EmbeddableImageRenderer have several attributes you can set.
You should check out the various members of UltraGrid ColumnStyle. The URL will for example add a hyperlink from the provided data.
I am trying to display pictures with text in the
UltraGrid (passport photo with name and dob for
example).
According to the Infragistics documentation you can
embed the WinFormattedLinkLabel in WinGrid. That
seems a good option, but I have no idea how to go
about that. Anyone?
There are a couple of ways of doing this. One is to use column styles. There's a sample on that in the WinGrid samples explorer.
The other way is to use embeddable editors. This allows you to add any control that implements a specific interface (I don't remember exactly which) into a grid. You drop the control onto the grid's container. Then, in the UltraGrid designer, you go to the relevant column (Bands and columns, select band, select column) and set the EditorControl property to the control you've dropped on the form. A list of appropriate controls will appear in a drop-down for the property.
-- peter
-- peter
Edit: Couldn't resist... I was able to display an
image (from disk that is) in a UltraFormatted*
Control. But I could not link the control to a cell
of row in the WinGrid. No results assigning the
EditorControl to the UltraFormatted* Control...
What kind of 'no results'? Do you mean you can't see the UltraFormatted* control in the drop-down?
The IG helps says "You can set Editor or EditorContol property of a column to change the editor that the column uses to edit its cells. The difference is that Editor property takes an instance of EmbeddableEditorBase while EditorControl takes an instance of Control. With EditorControl, you can put one of the editor controls like UltraCurrencyEditor on the form and assign that to the column's EditorControl property. NOTE: The control assigned to EditorControl must implement IProvidesEmbeddableEditor interface othewise set of the EditorControl will throw an exception."
It looks like UltraFormattedLinkLabel implements that interface, so it should appear in the drop-down.
And did you try setting the property in code? Eg.
ultraGrid1:DisplayLayout:Bands[2]:Columns:EditorControl = ultraFormattedLinkLabel1.
-- peter
Using the Wizards...
The ultraFormattedTextEditor1 is in the drop down list and the generated code does show the EditorContol assignment but there is no visual result when I run the form.
ultraGridColumn1:EditorControl = THIS-OBJECT:ultraFormattedTextEditor1.
Manually...
Settings the column EditorControl does not work...
rGrid:Layout:Bands(x):Columns(y):EditorControl = UltraFormattedTextEditor1.
Settings a cell EditorControl does not work...
rGrid:Layout:Rows(x):Columns(y):EditorControl = UltraFormattedTextEditor1.
Actually when I run this code the Procedure Editor crashes...
(probably caused by my coding constructs... )
Actually when I run this code the Procedure Editor
crashes...
(probably caused by my coding constructs... )
That, I'd log as a bug.
-- peter
See attachment.
I'm not sure if this is the correct syntax but setting the EditorControl on line 52 does not work...
[View:~/cfs-file.ashx/__key/communityserver-discussions-components-files/19/UltraFormatted.p:550:0]
See attachment.
I'm not sure if this is the correct syntax but
setting the EditorControl on line 52 does not
work...
I also tried this with no success.
I had success with embedding a colour picker in a grid (the AutoEdge TestDriveAppointmentDialog should have an example of that), so I know that it works in principle.
-- peter
Hhmm, maybe I will give it a try in VS.NET...
I <i>have</i> had success with embedding a colour
picker in a grid (the AutoEdge
TestDriveAppointmentDialog should have an example of
that), so I know that it works in principle.
I replaced it with a UltraCheckEditor like in TestDriveAppointmentDialog.cls but the session keeps crashing. So there must be something wrong with the code.
See attachment.
[View:~/cfs-file.ashx/__key/communityserver-discussions-components-files/19/UltraCheck.p:550:0]
I replaced it with a UltraCheckEditor like in
TestDriveAppointmentDialog.cls but the session keeps
crashing. So there must be something wrong with the
code.
Ah, but whose code?
Could you log this one too, please?
Thanks,
Peter
OK I have got it working with embeddable editors like Peter suggested.
In the Visual Designer it is pretty simple if you follow the instructions in WinFormattedLinkLabel -> Adding a Hyperlink to a Cell in Wingrid.
Most of the work is figuring out how to properly display everything - I wanted a horizontal cardview with no labels and headers. That took a while to get right (dynamically).
It seems to me that one of the things about this new GUI is that there is a lot of tips and techniques that goes with it. I haven't gotten into the manual yet, but let's just say that usually the manuals don't cover everything. I wonder if it would be a good idea to create a place on OE Hive where people could contribute code samples, tips, techniques, etc. Have to wait until after beta of course, so people should keep a folder of things that they might want to post later.
From tech support...
I played a bit with your code and if you replace your line with:
rGrid:DisplayLayout:Bands[0]:Columns[0]:EditorControl = UltraFormattedTextEditor1.
or
rGrid:DisplayLayout:Bands[0]:Columns[0]:EditorControl = UltraCheckEditor1.
Then everything works fine. As far as I could find "Layout" is an event handler, while layout is controlled by "DisplayLayout".