How to add a column in-between the column in datatable

i want to add a column in-between the column in datatable of column A and column B.
i dont want the column to added at end of the data table .

Add the Datacolumn to the datatable and use later SetOrdinal for moving it on a particular position


e.g. 1

Adopt the variables and argument values to your specific scenario. Screenshots just illustrate the essentials

1 Like

what should be selected in target type, shall i leave it null

iam getting error as value cannot be null, ParameterName:TargetObject, where as in target object aim passing value as DBDT.columns(“Status”)

As you are working on a datatable’s datacolumn object let targettype empty (as shown in the screenshot)

Target Object: YourDataTableVar.Columns(YourColNameOrIndex) - DBDT.columns(“Status”)
On the parameter assign the position (0based index) e.g. 1 for second position

1 Like

i have followed the the way u told,but getting error as value cannot be null, ParameterName:TargetObject and in parameter property i have set the number as 3

may we ask you to share some screenshots showing your implementation on this part.
This will help us to sort it out. Thanks

Find starter help here:
SetOrdinal.xaml (6.8 KB)

1 Like

perfect …thank u for your help

In case of further questions we are here and will help. Once you have done with the final testing mark the solving post as solution. So others can benefit from it. Thanks

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.