I want to add new column in existing DT at run time, so i used invoke method for same, but getting error on method name, i put method name as SetOrdinal.
Please find attached xml for same, Help me to find my error, Thank you in advance.Add_Column_Run_Time.xaml (6.8 KB)
Your issue with the xaml is fixed buddy. Made small changes as below.
–Changes with target object
–specified parameter in invoke method properties, that specifies the index where the column must be added.
One small suggestion, you can even add columns to a dt at runtime, if we iterate the datarow in the datatable, next with add column activity, all in for each loop, instead of for each row loop. We shall use invoke method to add columns if we want to add columns in the middle of table or change the position of newly created column.
Kindly find the resolved Xaml file, Hope this would help you…
If you want to add column to the middle of the datatable…you must read those as datarows in for each loop instead of for each row loop. Inside which we should have invoke method activity to add columns in specific position…as mentioned earlier
No worries i will send u a xaml file in 5 mins…for your reference…
Sorry for the misunderstanding of ur question