Manoj Chaurasia Posted November 17, 2014 Share Posted November 17, 2014 Hi All, I have a requirement of adding columns dynamically to table ,which i have done . But the problem Persists here is once the column inserted into table if again we will add the same column its should alert. PFA Dxp Thanks in advance Link to comment Share on other sites More sharing options...
Manoj Chaurasia Posted November 17, 2014 Author Share Posted November 17, 2014 yes exactly Link to comment Share on other sites More sharing options...
Manoj Chaurasia Posted November 17, 2014 Author Share Posted November 17, 2014 if that column alredy added to table and again we are adding that should alert but instead of that it s showing above Link to comment Share on other sites More sharing options...
niket tiwari 2 Posted October 23, 2015 Share Posted October 23, 2015 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 More sharing options...
Manoj Chaurasia Posted October 23, 2015 Author Share Posted October 23, 2015 Any update guys.... Link to comment Share on other sites More sharing options...
Manoj Chaurasia Posted October 23, 2015 Author Share Posted October 23, 2015 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 More sharing options...
Madhumita Mukherjee 2 Posted November 9, 2019 Share Posted November 9, 2019 Could you please also show how can we remove dynamically added columns in the table and add new ones. My table has more than 100 columns.I could add columns dynamically but if I dont want to show any column then how show I remove it dynamically and select another column instead Any help is appreciated.Thanks! Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now