optionsix
optionsix

Reputation: 956

Performing operation on column in bound datalist before display on front end

I have a datalist that is being bound from a codebehind page (data is coming from a stored procedure). I have one column/field that I need to do some custom formatting and math on before it displays on the front end. What's the easiest way to handle this in .NET?

Upvotes: 0

Views: 109

Answers (2)

paparazzo
paparazzo

Reputation: 45096

You could use a class Bind to a List Data and then use the Property Formatted

public class Data 
{
    private int rawData;
    Public Int Raw Data { get { return rawData; } }
    Public String Formatted { get { return .... } }

    public void Data(int _rawData) 
    { rawData = _rawData; }    
}

Upvotes: 0

Related Questions