Jump to content

I have a requirement of adding columns dynamically to table ,which i have done .


Manoj Chaurasia

Recommended Posts

  • 11 months later...

this error is populating while doing this..

A table plot column already exists for the data column.

at Spotfire.Dxp.Application.Visuals.TableColumnCollection.Add(DataColumn dataColumn)

at _stub_$34##34(Closure , CallSite , CodeContext , Object , Object )

at Microsoft.Scripting.Actions.MatchCaller.Call3[T0,T1,T2,TRet](Func`5 target, CallSite site, Object[] args)

at Microsoft.Scripting.Actions.CallSite`1.UpdateAndExecute(Object[] args)

at Microsoft.Scripting.Actions.UpdateDelegates.Update3[T,T0,T1,T2,TRet](CallSite site, T0 arg0, T1 arg1, T2 arg2)

at $20##20(Closure , Scope , LanguageContext )

at Spotfire.Dxp.Application.ScriptSupport.IronPythonScriptEngine.Execute(ScriptDefinition script, Dictionary`2 scope)

at Spotfire.Dxp.Application.Scripting.ScriptService.Execute(ScriptDefinition script, Dictionary`2 scope, LicenseManager licenseManager, NotificationService notificationService)

at Spotfire.Dxp.Application.Scripting.ScriptManager.c__DisplayClass4.b__3()

at Spotfire.Dxp.Framework.Commands.CommandHistory.Transaction(Executor executor, Boolean visible, Boolean sticky, Guid stickyGuid)

at Spotfire.Dxp.Framework.Commands.CommandHistory.Transaction(String displayName, Executor executor)

at Spotfire.Dxp.Framework.DocumentModel.DocumentNode.Transaction(String displayName, Executor executor)

at Spotfire.Dxp.Application.Scripting.ManagedScript.Execute(Dictionary`2 environment)

at Spotfire.Dxp.Application.Scripting.PropertyChangedScriptEventHandler.b__2()

at Spotfire.Dxp.Framework.DocumentModel.InternalEventManager.InvariantKeeperConnection.EnsureInvariantHolds()

at Spotfire.Dxp.Framework.Commands.CommandHistory.CommitOutermostTransaction(Object busyProof, Boolean oldHiding, Boolean sticky, Guid stickyGuid)

at Spotfire.Dxp.Framework.Commands.CommandHistory.OutermostTransactionHandle.PerformCommit()

at Spotfire.Dxp.Framework.Commands.CommandHistory.Transaction(Executor executor, Boolean visible, Boolean sticky, Guid stickyGuid)

at Spotfire.Dxp.Framework.Commands.CommandHistory.Transaction(String displayName, Executor executor)

at Spotfire.Dxp.Framework.DocumentModel.DocumentNode.Transaction(String displayName, Executor executor)

at Spotfire.Dxp.Application.Visuals.HtmlTextArea.InteractWithControl(String id, Action`1 interaction)

Link to comment
Share on other sites

it was an error you suppose to catch errors

FIXED:

import clr

clr.AddReference("System.Windows.Forms")

from System.Windows.Forms import MessageBox

from Spotfire.Dxp.Application.Visuals import VisualContent

from Spotfire.Dxp.Application.Visuals import TablePlot

from Spotfire.Dxp.Application import *

viz=emp.As[VisualContent]()

if columns==columnname :

try:

viz.TableColumns.Add(dataTable.Columns[columns])

except:

MessageBox.Show("Column alredy added")

Thanks :)

thats what i was looking for changing columns based on property value using SCRIPT :)

Link to comment
Share on other sites

  • 4 years later...

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...