format decimal value in gridview

后端 未结 4 809
刺人心
刺人心 2021-01-03 07:09

I have a bound field in my Gridview which is getting its value from a database table.

I have got the data but don\'t know how to format it inside the gridview.

4条回答
  •  滥情空心
    2021-01-03 07:41

    Use DataFormat property :

    
    

    EDIT : For the second part of your question use Eval method's second parameter to format your data :

    <%# Eval("NumFailedFiles", "{0:n3}") %>
    

    Then your template will be like that :

    
        
         
            
        
    
    

提交回复
热议问题