Private Sub dateINvode()
Dim UpCol As New ButtonColumn
'Dim usint() As Unit
'usint1 = Unit(30)
UpCol.ButtonType = ButtonColumnType.PushButton
UpCol.CommandName = "Update"
UpCol.HeaderText = "編輯"
UpCol.Text = "編輯"
'UpCol.ItemStyle.Width = New Unit(30)
DataGrid1.Columns.Add(UpCol)
Dim deleteCol As New ButtonColumn
deleteCol.ButtonType = ButtonColumnType.PushButton
deleteCol.CommandName = "delete"
deleteCol.HeaderText = "編輯"
deleteCol.Text = "刪除"
'deleteCol.Visible = False
'deleteCol.ItemStyle.Width = 40
DataGrid1.Columns.Add(deleteCol)
Dim bcol As New BoundColumn
bcol.DataField = "STAT_CDC"
bcol.HeaderText = "ステータス"
'bcol10.ItemStyle.Width = 0
bcol.ReadOnly = True
'bcol10.Visible = False
DataGrid1.Columns.Add(bcol)
Dim bcol0 As New BoundColumn
bcol0.DataField = "BUMON_MEI"
bcol0.HeaderText = "担当部署"
'bcol10.ItemStyle.Width = 0
bcol0.ReadOnly = True
'bcol10.Visible = False
DataGrid1.Columns.Add(bcol0)
Dim bcol4 As New BoundColumn
bcol4.DataField = "TISIM_MEI"
bcol4.HeaderText = "施設長名"
'bcol10.ItemStyle.Width = 0
bcol4.ReadOnly = True
'bcol10.Visible = False
DataGrid1.Columns.Add(bcol4)
Dim bcol5 As New BoundColumn
bcol5.DataField = "DISIM_MEI"
bcol5.HeaderText = "代表医師名"
'bcol10.ItemStyle.Width = 0
bcol5.ReadOnly = True
'bcol10.Visible = False
DataGrid1.Columns.Add(bcol5)
Dim bcol6 As New BoundColumn
bcol6.DataField = "IRAI_SUU"
bcol6.HeaderText = "依頼例数"
'bcol10.ItemStyle.Width = 0
bcol6.ReadOnly = True
'bcol10.Visible = False
DataGrid1.Columns.Add(bcol6) Dim bcol9 As New BoundColumn
bcol9.DataField = "SBIKOU_BUN"
bcol9.HeaderText = "備考"
'bcol10.ItemStyle.Width = 0
bcol9.ReadOnly = True
'bcol11.Visible = False
DataGrid1.Columns.Add(bcol9)
End Sub
这是我的初始化DATAGRID 从数据库取得数据后会出来"編輯","刪除" 按钮,怎样让这些不能按,可以看到!
望高手指教!