Jump to content

Is there a way to change the column width and cell heigth from a custom renderer?


Ronald Brill

Recommended Posts

I have implemented a CustomValueRenderer that converts text into a graphic. Works fine so far. But the graphic requires larger cells to be readable.

Therefore i like to change the column width and the cell height (for all cells) at best at the moment the cell renderer for a column is switched to my one.

Any chance to do this from my C# code?

Link to comment
Share on other sites

Next stupid question....

Wrote a CustomApplicationEventHandler. The handler is triggered and the AddEventHandler method is called when open a new document.

But my method ValueRenderersChanged() is never called.

  public class ContentTypeDetectEventHandler : CustomApplicationEventHandler

  {

    private static ExternalEventManager externalEventManager = new ExternalEventManager();

    protected override void OnApplicationInstanceCreated(AnalysisApplication application)

    {

      base.OnApplicationInstanceCreated(application);

      application.DocumentChanged += (obj, eventArgs) =>

      {

        AnalysisApplication app = obj as AnalysisApplication;

        if (app == null || app.Document == null) { return; }

        externalEventManager.AddEventHandler(

                    ValueRenderersChanged,

                    Trigger.CreatePropertyTrigger(app.Document, TableColumnCollection.PropertyNames.ValueRenderers));

      };

    }

    public void ValueRenderersChanged()

    {

    }

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...