Hi, I am trying to attach my own display object to a WinGrid (UltraGrid ? UltraWinGrid? whatever) cell in order to display a picture depending on which row is active, and I see that the grid can indeed embed a custom control if this implements the IProvidesEmbeddableEditor interface.
This interface lives in the Infragistics.WebUI.Shared Namespace - which has afaik nothing to do with the WinForms namespace in which I am working. Do I have to install all the ASP.NET stuff in order to reference it (so that I can implement it)? What if we had only bought Infragistics for WinForms (in fact I have the whole ...for .NET, fortunately)? And why do I have to implement RenderValue, which "Returns rendered HTML string from provided value...." when I have a WinForm which knows nothing about HTML??
Thanks, Joel
Mike,
Can you provide more detail or a working example of this?
I am actually trying to embed a custom control into the FilterRow dropdown. I assume what you are talking about in this post would work for myself, as my grid is not editable so setting the
column.FilterOperandStyle = FilterOperandStyle.UseColumnEditor
should pick up the columns editor, correct?
Thanks
ok, thanks, that's the kind of thing I was looking for.
Hi Joel,
I think you might be underestimating the job you are undertaking here. Creating an editor is not a trivial process by any means. It is, in fact, extremely complex and it can take even an experienced developer several days of coding to create one. It will be especially difficult unless you own a subscription that includes the Infragistics source code so you have working examples of editors to refer to. So I would strongly advise against attempting it if you can possibly acheive what you need in some other way.
I'm not really sure what you mean by this:
joels said:the editor seems to be intended only for displaying text
An editor can display things in many different ways. There are existing editors that display checkboxes, images, optionsets, progress bars, etc. So it's certainly not limited to text.
Perhaps it would be sufficient to put your control into a dropdown in a cell rather than directly into the cell itself. This would be very easy to impement using an existing editor with a DropDownEditorButton.
Thanks, found it. Now it only requires that my object return an EmbaddabeEditorBase. This throws up a couple of new questions though - the editor seems to be intended only for displaying text. I have my own "paintbox" object that I would like to display in the grid - how can I get a subclassed editor to show my own object? The properties which are related to size, e.g., seem all to be to do with text.
Am I going to have to export a bitmap and show that? I'd rather not...
Joel
Infragistics.WebUI.Shared is not the right assembly. That assembly is installed by the ASP.Net controls in order to be used by the designers. You should never use it in your applications.
IProvidesEmbeddableEditor exists in either Infragistics.Win or Infragistics.Shared (I forget which, but it really doesn't matter much since these assemblies are used by almost every other WinForms assembly).