How to custom format data in datagridview during databinding

前端 未结 7 745
忘掉有多难
忘掉有多难 2020-12-16 14:21

I\'m looking for a way to format DataGridViewTextBoxColumn so that the value to be databinded is formatted during databinding. For example I have a CompanyName property and

7条回答
  •  隐瞒了意图╮
    2020-12-16 15:04

    You could always call a custom format function like so from your aspx page:

    
    
        
            
                
        
    
    

    And then in your code behind for that page:

    protected string GetImagePath(object abbr){
    return string.Format("{0}{1}.gif", Constants.URLs.PLATFORM_LOGOS, abbr.ToString());}
    

提交回复
热议问题