隱藏gridview第一列 和 設置日期格式

‘隱藏gridview第一列

Protected Sub GridView1_RowCreated(ByVal sender As ObjectByVal e As System.Web.UI.WebControls.GridViewRowEventArgs) Handles GridView1.RowCreated
        
If e.Row.RowType = DataControlRowType.DataRow Or e.Row.RowType = DataControlRowType.Header Then
            e.Row.Cells(
0).Visible = False
            
'e.Row.Cells(0).Width = 80
        End If
    
End Sub

 

’設置日期格式爲2008-01-01
  TextBox1.Text 
= Now().Date.ToString("yyyy-MM-dd")

 

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章