Closed - Grid - Setting

摘要:Check Grid 有沒有selected item

 

AutoColSize

 

 

Call Me.grdLabOrderDetail.AutoSizeCol(Me.grdLabOrderDetail.Cols("ExamName").Index)

 

Gird 要用AfterEdit

 

"Select Case e.Col
            Case 1
                If Me.grdDoctor.Item(Me.grdDoctor.RowSel, e.Col) = True Then
                    msDoctorInchargeCode = Me.grdDoctor.Item(Me.grdDoctor.RowSel, ""DrCode"")

                Else
                    If msDoctorInchargeCode = Me.grdDoctor.Item(Me.grdDoctor.RowSel, ""DrCode"") Then
                        msDoctorInchargeCode = BLANK
                    End If
                End If
                Call FillGridDoctor()

        End Select"

 

 


更改row volor

 

"            SteelBlueRowStyle = Me.grdLabOrderDetail.Styles.Add(""InDB"", Me.grdLabOrderDetail.Styles.Normal)
            SteelBlueRowStyle.Font = New Font(Me.grdLabOrderDetail.Styles.Fixed.Font.Name, 11, FontStyle.Regular, GraphicsUnit.Point)
            SteelBlueRowStyle.ForeColor = System.Drawing.Color.SteelBlue

            'BlackRowStyle = Me.grdLabOrderDetail.Styles.Add(""Cancel"", Me.grdLabOrderDetail.Styles.Normal)
            'BlackRowStyle.Font = New Font(Me.grdLabOrderDetail.Styles.Fixed.Font.Name, 11, FontStyle.Regular, GraphicsUnit.Point)
            'BlackRowStyle.ForeColor = System.Drawing.Color.Black"

 

 

Private GridRowStyle As C1.Win.C1FlexGrid.CellStyle

            GridRowStyle = Me.grdLabOrderDetail.Styles.Add("OrchidStyle", Me.grdLabOrderDetail.Styles.Normal)
            GridRowStyle.Font = New Font(Me.grdLabOrderDetail.Styles.Fixed.Font.Name, 12, FontStyle.Bold, GraphicsUnit.Point)
            GridRowStyle.ForeColor = System.Drawing.Color.MediumBlue

                        Me.grdLabOrderDetail.Rows.Item(liGridRow).Style = GridRowStyle

 

 

更改column color

 

                Me.grdPatientListVertical.Cols(liColumn).Style.ForeColor = ForeColor.DarkBlue
                Me.grdPatientListVertical.Cols(liColumn).Width = 295
                Me.grdPatientListVertical.Cols(liColumn).Caption = "Doctor " & liColumn

 

 

 

                Me.grdPatientListVertical.Cols(liColumn).AllowSorting = False
                Me.grdPatientListVertical.Cols(liColumn).TextAlign = C1.Win.C1FlexGrid.TextAlignEnum.LeftCenter
                Me.grdPatientListVertical.Cols(liColumn).AllowResizing = True

 

 


 

 

 Check Grid 有沒有selected item

 


        If Me.grdPatQueue.RowSel < Me.grdPatQueue.Rows.Fixed Then

        End If

 

 

 

 

------------------

熱愛生命 喜愛新奇 有趣的事物

 

過去 是無法改變
將來 卻能夠創造

 

希望使大家生活更便利
世界更美好

 

a guy who loves IT and life