Retrieve position of specific column name

Is there a way to retrieve the position of a specified column name?
I tried using lookup datatable and referring to the example xaml file provided on the main site but fail to achieve my goals as I just need to find the position based on a specified column name.
Any advise will be appreciated :slight_smile:

Hi,

Can you try DataColumn.Ordinal Property as the following?

dt.Columns("Column1").Ordinal

Regards,


I received this error…
I’m using row[new DateTime(DateTime.Now.Year, DateTime.Now.Month, 1).AddDays(1 + counter).ToString(“dd-MMM”)] as my column name

Hi,

Do you use C# mode? If so, it should be dt.Columns["Column1"].Ordinal

Regards,

1 Like

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