Hi,
I'm trying to assign the same instance of an editor control to multiple bands of an UltraGrid, and it doesn't appear to be working correctly...
I've created a sub-class of the UltraFormattedTextEditor which simply adds an editor button to it. I've assigned the same instance to multiple bands, and while it works great within the same band, it does not appear to be working across bands. The first band will show the formatted text, but any other bands show the format source instead.
Should I be able to use the same instance across bands, or do I have to create an instance for each band?
Thanks
You should be able to use the same instance of the control across multiple bands; in fact, with a non-derived UltraFormattedTextEditor I can add a button to the ButtonsRight collection and assign it to two different columns in two different bands and the button will appear corectly. I'm also not sure why you mean by showing the "format source".
-Matt
I was a little afraid of that.
I actually have several different grids that I'm using the same subclass in, and that ends up causing a designer bug because the places where I'm using the sublcass end up trying to add the button again, thus ending up with a duplicate key...
In my case it appears the editor isn't taking affect as I'm not getting the button either...
As far as the format source, I was meaning the HTML value of the cell, instead of the rendered view of it.
It must be something we're doing, I'll just have to hunt it down. Thanks.
If interested, the majority of the sublcass source is as follows...
public class HtmlUltraGridEditor : UltraFormattedTextEditor
{
/// <summary>
/// Creates a new instance of the AsYouTypeFormattedTextEditor.
/// </summary>
_editorButton = new EditorButton("...");
}
/// Returns the EditorButton used by this AsYouTypeFormattedTextEditor.
get
/// Enters the advanced editing for this cell.
/// <param name="cell"></param>
// opens a separate editor for more advanced editing
/// When the editor button is clicked, the advanced HTML editing dialog will be displayed.
/// <param name="e"></param>