Quantcast
Channel: Programming Forums
Viewing all articles
Browse latest Browse all 51036

Calculated Split()

$
0
0
I have a data table that contains a field called "ProductNum". Row items have a product number like "N-006504-S".

So I can properly sort my on my column , I need to remove the "-" and sort on index 1 after the split.

Ideally, I'd like to do something like this.

Datatable dt;
Dt.columns.add("ProductnumSplit", typeof(string), "ProductNum.Split('-')[1]");



Builds of course, but doesn't work. Any Ideas on a work around?

Also, I apologize if there are any syntax issues, I'm not near a computer And am typing this from my iPad . (And it took 5 times longer too :) )

Viewing all articles
Browse latest Browse all 51036

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>